diff mbox series

[v2,26/39] bdinfo: Drop print_bi_flash()

Message ID 20200510201702.196031-18-sjg@chromium.org
State Accepted
Commit aa8b758a88cccddb4f6eab3b90dbc7ab9ed43355
Headers show
Series Tidy up the 'bd' command. | expand

Commit Message

Simon Glass May 10, 2020, 8:16 p.m. UTC
This function only has three lines of code in it so inline it. This helps
to put all the code in one place for future partitioning.

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

Changes in v2:
- Update commit message with an extra motivation

 cmd/bdinfo.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Comments

Bin Meng May 17, 2020, 2:09 p.m. UTC | #1
On Mon, May 11, 2020 at 4:17 AM Simon Glass <sjg at chromium.org> wrote:
>
> This function only has three lines of code in it so inline it. This helps
> to put all the code in one place for future partitioning.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2:
> - Update commit message with an extra motivation
>
>  cmd/bdinfo.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff mbox series

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index b65eec332d..f22dc7a129 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -87,13 +87,6 @@  static void print_bi_dram(const bd_t *bd)
 #endif
 }
 
-static void print_bi_flash(const bd_t *bd)
-{
-	print_num("flashstart", (ulong)bd->bi_flashstart);
-	print_num("flashsize", (ulong)bd->bi_flashsize);
-	print_num("flashoffset", (ulong)bd->bi_flashoffset);
-}
-
 static void print_eth_ip_addr(void)
 {
 #if defined(CONFIG_CMD_NET)
@@ -135,7 +128,9 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	print_bi_dram(bd);
 	print_num("memstart", (ulong)bd->bi_memstart);
 	print_lnum("memsize", (u64)bd->bi_memsize);
-	print_bi_flash(bd);
+	print_num("flashstart", (ulong)bd->bi_flashstart);
+	print_num("flashsize", (ulong)bd->bi_flashsize);
+	print_num("flashoffset", (ulong)bd->bi_flashoffset);
 	print_eth_ip_addr();
 	printf("baudrate    = %u bps\n", gd->baudrate);
 	print_num("relocaddr", gd->relocaddr);