diff mbox series

[19/36] bdinfo: ppc: Drop arch-specific print_baudrate()

Message ID 20200504231732.98778-11-sjg@chromium.org
State Superseded
Headers show
Series Tidy up the 'bd' command. | expand

Commit Message

Simon Glass May 4, 2020, 11:17 p.m. UTC
This function outputs the same basic info. Since the baud rate is commonly
115200 these is often no difference. Drop the arch-specific code and
inline it to avoid a one-line function.

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

 cmd/bdinfo.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Bin Meng May 6, 2020, 8:09 a.m. UTC | #1
On Tue, May 5, 2020 at 7:19 AM Simon Glass <sjg at chromium.org> wrote:
>
> This function outputs the same basic info. Since the baud rate is commonly
> 115200 these is often no difference. Drop the arch-specific code and
> inline it to avoid a one-line function.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  cmd/bdinfo.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Stefan Roese May 6, 2020, 3:09 p.m. UTC | #2
On 05.05.20 01:17, Simon Glass wrote:
> This function outputs the same basic info. Since the baud rate is commonly
> 115200 these is often no difference. Drop the arch-specific code and
> inline it to avoid a one-line function.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
> 
>   cmd/bdinfo.c | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
> index 4e08d9e40a..62eea010c5 100644
> --- a/cmd/bdinfo.c
> +++ b/cmd/bdinfo.c
> @@ -137,15 +137,6 @@ static void print_eth_ip_addr(void)
>   #endif
>   }
>   
> -static void print_baudrate(void)
> -{
> -#if defined(CONFIG_PPC)
> -	printf("baudrate    = %6u bps\n", gd->baudrate);
> -#else
> -	printf("baudrate    = %u bps\n", gd->baudrate);
> -#endif
> -}
> -
>   void __weak board_detail(void)
>   {
>   	/* Please define board_detail() for your PPC platform */
> @@ -165,8 +156,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
>   	print_bi_mem(bd);
>   	print_bi_flash(bd);
>   	print_eth_ip_addr();
> -	print_baudrate();
> -	print_std_bdinfo(bd);
> +	printf("baudrate    = %u bps\n", gd->baudrate);
>   	print_num("relocaddr", gd->relocaddr);
>   	print_num("reloc off", gd->reloc_off);
>   	print_cpu_word_size();
> 


Viele Gr??e,
Stefan
diff mbox series

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 4e08d9e40a..62eea010c5 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -137,15 +137,6 @@  static void print_eth_ip_addr(void)
 #endif
 }
 
-static void print_baudrate(void)
-{
-#if defined(CONFIG_PPC)
-	printf("baudrate    = %6u bps\n", gd->baudrate);
-#else
-	printf("baudrate    = %u bps\n", gd->baudrate);
-#endif
-}
-
 void __weak board_detail(void)
 {
 	/* Please define board_detail() for your PPC platform */
@@ -165,8 +156,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	print_bi_mem(bd);
 	print_bi_flash(bd);
 	print_eth_ip_addr();
-	print_baudrate();
-	print_std_bdinfo(bd);
+	printf("baudrate    = %u bps\n", gd->baudrate);
 	print_num("relocaddr", gd->relocaddr);
 	print_num("reloc off", gd->reloc_off);
 	print_cpu_word_size();