All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v2 30/39] bdinfo: net: Drop legacy ethernet bdinfo
Date: Sun, 10 May 2020 14:16:53 -0600	[thread overview]
Message-ID: <20200510201702.196031-22-sjg@chromium.org> (raw)
In-Reply-To: <20200510201702.196031-1-sjg@chromium.org>

This code pre-dates driver model and the migration date is nearly upon us.
Pare the print_eths() function down and enable it for driver model, since
it works correctly.

The IP address is already printed in print_eth_ip_addr() so we can remove
that.

Since this results in a one-line print_eths() function, inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Squash in the next patch to inline print_eths()

 cmd/bdinfo.c | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 6fa8b32389..e6237daf93 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -34,27 +34,6 @@ static void print_eth(int idx)
 	printf("%-12s= %s\n", name, val);
 }
 
-#ifndef CONFIG_DM_ETH
-__maybe_unused
-static void print_eths(void)
-{
-	struct eth_device *dev;
-	int i = 0;
-
-	do {
-		dev = eth_get_dev_by_index(i);
-		if (dev) {
-			printf("eth%dname    = %s\n", i, dev->name);
-			print_eth(i);
-			i++;
-		}
-	} while (dev);
-
-	printf("current eth = %s\n", eth_get_name());
-	printf("ip_addr     = %s\n", env_get("ipaddr"));
-}
-#endif
-
 static void print_lnum(const char *name, unsigned long long value)
 {
 	printf("%-12s= 0x%.8llX\n", name, value);
@@ -116,9 +95,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	print_num("relocaddr", gd->relocaddr);
 	print_num("reloc off", gd->reloc_off);
 	printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8);
-#if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH)
-	print_eths();
-#endif
+	if (IS_ENABLED(CONFIG_CMD_NET))
+		printf("current eth = %s\n", eth_get_name());
 	print_num("fdt_blob", (ulong)gd->fdt_blob);
 	print_num("new_fdt", (ulong)gd->new_fdt);
 	print_num("fdt_size", (ulong)gd->fdt_size);
-- 
2.26.2.645.ge9eca65c58-goog

  parent reply	other threads:[~2020-05-10 20:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 20:16 [PATCH v2 00/39] Tidy up the 'bd' command Simon Glass
2020-05-10 20:16 ` [PATCH v2 01/39] tbs2910: Drop " Simon Glass
2020-05-17 13:57   ` Bin Meng
2020-05-10 20:16 ` [PATCH v2 02/39] bdinfo: nds32: Use generic bd_info Simon Glass
2020-05-10 20:16 ` [PATCH v2 03/39] bdinfo: riscv: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 04/39] bdinfo: m68k: Drop bd_info->bi_ipbfreq Simon Glass
2020-05-10 20:16 ` [PATCH v2 05/39] bdinfo: xtensa: Create a generic do_bdinfo for xtensa Simon Glass
2020-05-10 20:16 ` [PATCH v2 06/39] bdinfo: mips: Use the generic bd command Simon Glass
2020-05-10 20:16 ` [PATCH v2 07/39] bdinfo: nios2: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 08/39] bdinfo: microblaze: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 09/39] bdinfo: sh: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 10/39] bdinfo: x86: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 11/39] bdinfo: sandbox: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 12/39] bdinfo: nds32: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 13/39] bdinfo: riscv: " Simon Glass
2020-05-10 20:16 ` [PATCH v2 14/39] bdinfo: powerpc: " Simon Glass
2020-05-17 14:01   ` Bin Meng
2020-05-10 20:16 ` [PATCH v2 15/39] bdinfo: m68k: " Simon Glass
2020-05-17 14:03   ` Bin Meng
2020-05-10 20:16 ` [PATCH v2 16/39] bdinfo: arm: " Simon Glass
2020-05-17 14:05   ` Bin Meng
2020-05-10 20:16 ` [PATCH v2 17/39] bdinfo: arc: " Simon Glass
2020-05-12 11:00   ` Alexey Brodkin
2020-05-17 14:05   ` Bin Meng
2020-05-10 20:16 ` [PATCH v2 18/39] bdinfo: Drop the option to not use the generic 'bd' command Simon Glass
2020-05-10 20:16 ` [PATCH v2 19/39] bdinfo: Drop unused __maybe_unused Simon Glass
2020-05-10 20:16 ` [PATCH v2 20/39] bdinfo: microblaze: sh: nios2: Drop arch-specific flash info Simon Glass
2020-05-10 20:16 ` [PATCH v2 21/39] bdinfo: Drop unnecessary inline on functions Simon Glass
2020-05-10 20:16 ` [PATCH v2 22/39] bdinfo: Drop print_std_bdinfo() Simon Glass
2020-05-10 20:16 ` [PATCH v2 23/39] bdinfo: ppc: Drop arch-specific print_baudrate() Simon Glass
2020-05-10 20:16 ` [PATCH v2 24/39] bdinfo: sh: arc: Drop arch-specific print_bi_mem() Simon Glass
2020-05-10 20:16 ` [PATCH v2 25/39] bdinfo: Drop print_bi_boot_params() Simon Glass
2020-05-10 20:16 ` [PATCH v2 26/39] bdinfo: Drop print_bi_flash() Simon Glass
2020-05-17 14:09   ` Bin Meng
2020-05-10 20:16 ` [PATCH v2 27/39] bdinfo: Drop print_cpu_word_size() Simon Glass
2020-05-10 20:16 ` [PATCH v2 28/39] bdinfo: net: ppc: Drop bi_enet1addr and other similar info Simon Glass
2020-05-10 20:16 ` [PATCH v2 29/39] bdinfo: net: ppc: Drop prints for CONFIG_HAS_ETHn Simon Glass
2020-05-10 20:16 ` Simon Glass [this message]
2020-05-17 14:10   ` [PATCH v2 30/39] bdinfo: net: Drop legacy ethernet bdinfo Bin Meng
2020-05-10 20:16 ` [PATCH v2 31/39] bdinfo: net: Inline print_eth_ip_addr() Simon Glass
2020-05-10 20:16 ` [PATCH v2 32/39] bdinfo: Export some basic printing functions Simon Glass
2020-05-10 20:16 ` [PATCH v2 33/39] bdinfo: arm: Move ARM-specific info into its own file Simon Glass
2020-05-10 20:16 ` [PATCH v2 34/39] bdinfo: ppc: Move PPC-specific " Simon Glass
2020-05-10 20:16 ` [PATCH v2 35/39] bdinfo: m68k: Move m68k-specific " Simon Glass
2020-05-14 12:41   ` Angelo Dureghello
2020-05-10 20:16 ` [PATCH v2 36/39] bdinfo: m68k: ppc: Move arch-specific code from bdinfo Simon Glass
2020-05-10 20:17 ` [PATCH v2 37/39] bdinfo: Update the file comments Simon Glass
2020-05-10 20:17 ` [PATCH v2 38/39] bdinfo: dm: Update fb_base when using driver model Simon Glass
2020-05-10 20:17 ` [PATCH v2 39/39] bdinfo: x86: vesa: Update fb_base to the correct value Simon Glass
2020-06-25 22:16 ` [PATCH v2 00/39] Tidy up the 'bd' command Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200510201702.196031-22-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.