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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 AFA6EC2B9F4 for ; Mon, 14 Jun 2021 17:04:56 +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 933F1613C2 for ; Mon, 14 Jun 2021 17:04:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 933F1613C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 EE06080EC7; Mon, 14 Jun 2021 19:04:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="gs7iztfX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A202B81249; Mon, 14 Jun 2021 19:04:51 +0200 (CEST) Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) (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 A45FF80EC7 for ; Mon, 14 Jun 2021 19:04:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rfried.dev@gmail.com Received: by mail-ot1-x32b.google.com with SMTP id j11-20020a9d738b0000b02903ea3c02ded8so11516291otk.5 for ; Mon, 14 Jun 2021 10:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M+ZzxhvaKezQq0EbIQauKaWfqH/4K0dPurIavnQ8tNA=; b=gs7iztfXHhfMiHrck28WpxcnW822nCVYylBl/z9gyDtYXL4bKWoi/x1bev3VitOnFA beUJM26xNZfvAMFYyxaFUOPwGnYlA+pH+sn2QTNdV+EIVpUGG+W0Qe7oHtT/Oj/GftgP osFWwHnfJLZHssUZNNkVeq9B8lGkGogemtsrb/nF/Z9BXoeT1JJ1aOoczbWwpmwh1DrO Z8vr1vvpHqxv343WXKQPf1l4xhTbNVuSLysYY2eo8oCt/3NUtqt3Ek67VCalBRcVLC5h ivhZbyIaKIAlaXoMmT9zVvmDV4q25ft7pRkfM/4hp49c014t4NefsbJBPs+T7wQpE6Fw fn6Q== 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=M+ZzxhvaKezQq0EbIQauKaWfqH/4K0dPurIavnQ8tNA=; b=qrgmal/z8GjVMLDQ63d+ZEuQgcEPnRJmeCuwzt3XW238E6vVGuYZsWVnTboJKobm+6 CzWirGc1UgJcLC5ij/+sIUvp5K4NnG4PG7+CXjlDGPkerpB8HN6i2EJXAdjb4izC3l6r r9wMTD+9i1IawhBZS1qe5aQDNjTAERknjWU8zTM4nQM4yBbmzPPomL1mfwy+3M7e26mh dkTZNjIIIfeNeazqm/KeP6gehFjSWgYYwS4jBlD8VdO9Qy388Mds1VQx4TvB0gmLtTqB uSnk04yrcJZCIYjSRl03smrGr260EztEPPvjVQUfk6zXYqRRwX3W5Aimmkf8gwO/lc5P 4dXw== X-Gm-Message-State: AOAM530s+IDAuom8xp0IsxtT67nRjz08Ug8V8JzoK3rCxdWMPbaIvzI7 fy9UYstqDymXLOvhscYyV58jIsqWEcKO0vB1P34= X-Google-Smtp-Source: ABdhPJxp7rd9nlWX7qPOsl7K/W9was5CiXRcqPtSonXtp9VS1Fh+O8kKxzpFFgalXts0sRq3x9tFgkK40KYedUowc4Y= X-Received: by 2002:a9d:4b02:: with SMTP id q2mr14553835otf.370.1623690287132; Mon, 14 Jun 2021 10:04:47 -0700 (PDT) MIME-Version: 1.0 References: <20210611195259.6040-1-tharvey@gateworks.com> In-Reply-To: From: Ramon Fried Date: Mon, 14 Jun 2021 20:04:36 +0300 Message-ID: Subject: Re: [PATCH v2] cmd: net: add a 'net list' command to list network devs To: Tim Harvey 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 Mon, Jun 14, 2021 at 6:36 PM Tim Harvey wrote: > > 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 Sounds good to me.