From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B01A9C2B9F4 for ; Mon, 14 Jun 2021 15:36:34 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 764D261241 for ; Mon, 14 Jun 2021 15:36:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 764D261241 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A016080F03; Mon, 14 Jun 2021 17:36:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b="ukPPyTjX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B45781671; Mon, 14 Jun 2021 17:36:27 +0200 (CEST) Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8E73E80092 for ; Mon, 14 Jun 2021 17:36:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: by mail-pg1-x532.google.com with SMTP id t13so1589743pgu.11 for ; Mon, 14 Jun 2021 08:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EfmXxETsysZNNRgwYynuPfsuEI3O3SsW6QDzbWRyvlk=; b=ukPPyTjXrn7cqhUn9Sqn+XRAwIMFpxdcb7F8K8nT/84AslfXmQrMfEqJsK9aCO0gQQ iA12zt612XxLAtZrOkvJuXsv9xLHWs5cu4guPrSLcVQqTYDL3IyhkQjwN8WhnqQgU6/8 pCkARe8tIudZCVBlQnS66VCRL8WtRoN2bDmrHV9lOvSFaIVee2xLpoZ7ROxZ8JAQxIaJ NPQy20jTh3ys8o/t1YX5ivzEsXEOUZ+ogELDq4E1VjNaAAx3daDGMcASB1bqMZ7zJFFW 3GiiK9jnuH0mtlmlBa0X2GTSddnVOdMPIWHeoMrK1ffqzTd5dPHhdf2eAUNibUJEpsl/ VgWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EfmXxETsysZNNRgwYynuPfsuEI3O3SsW6QDzbWRyvlk=; b=fVqtHoQ7BwuWBSF32I7xXDCTYJGr/h4AkhtS1DFQuKTnYnl2KmQ8MSYJXhnt8umLSD PFbAmSiKS12HyyrzKiFCLfM9NSy1yV9Kjd5bzsPzCNBBY4/I5V02inY5vl1yXVvV0ZbW aS7aIe+1a/TyfPYK9ve8xWpH1uZSuEie5ZKzpPO6Qws1qcR8hGFSQkTLSvpVjegsH/lF NxQF2sFjZ0WtEIKVYFS39VBo7ko2upRM2+clhLvq+O+Z3DED9I5Y4cMMWfd9zi8RdZCn 6zdpn+8kE1+zibJMKJK1wEXuwNL/c1IlxSWRS6EOTvBzZPzGeHa6mh1hnUXEYiREMlPg QG5A== X-Gm-Message-State: AOAM533f+90xzD+vOwlTn5GEm++eAMSs04qu/BLzvyVDewFKSrogcTGL PX1osgq7yCSzIMYU+HBBTon8xRDVDZ9YAyDYZFyE6A== X-Google-Smtp-Source: ABdhPJz5ZfiwzwCUlXysukpxixn8Q6Fe6HKd4KOOTNuU+td2KcWRRIW6XOJ2Nz79P+WvB2ZS1PFdTLKsGlHG8/FM93c= X-Received: by 2002:a65:6909:: with SMTP id s9mr18064479pgq.126.1623684981807; Mon, 14 Jun 2021 08:36:21 -0700 (PDT) MIME-Version: 1.0 References: <20210611195259.6040-1-tharvey@gateworks.com> In-Reply-To: From: Tim Harvey Date: Mon, 14 Jun 2021 08:36:09 -0700 Message-ID: Subject: Re: [PATCH v2] cmd: net: add a 'net list' command to list network devs To: Ramon Fried Cc: U-Boot Mailing List , Joe Hershberger , Stefan Roese , Marek Vasut Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Sat, Jun 12, 2021 at 12:02 PM Ramon Fried wrote: > > Hi Tim. > The patch fails build in several boards (Malta variants): > > +cmd/net.c: In function 'do_net_list': > 42+cmd/net.c:487:34: error: initialization of 'const struct udevice *' > from incompatible pointer type 'struct eth_device *' > [-Werror=incompatible-pointer-types] > 43+ 487 | const struct udevice *current = eth_get_dev(); > 44+ | ^~~~~~~~~~~ > Ramon, Looks like my patch only works for DM_ETH. If I were to implement this for legacy eth it would probably be a mess as the device list is a static struct in net/eth_legacy.c. I'm not sure how to tell how many boards are out there that are not yet converted to DM_ETH and am not sure when legacy eth goes away. How about if I just add #ifdef CONFIG_DM_ETH around the whole thing and it isn't supported for legacy eth? Best Regards, Tim