Patchwork [U-Boot,3/4] common: cmd_bdinfo: Fix compilation warning for microblaze

login
register
mail settings
Submitter Michal Simek
Date Jan. 23, 2013, 1:31 p.m.
Message ID <1358947873-3731-3-git-send-email-michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/214945/
State Accepted
Delegated to: Michal Simek
Headers show

Comments

Michal Simek - Jan. 23, 2013, 1:31 p.m.
Fix one printf compilation warning in microblaze bdinfo part.

Warning log:
cmd_bdinfo.c: In function 'do_bdinfo':
cmd_bdinfo.c:219:2: warning: format '%u' expects argument of type
'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 common/cmd_bdinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Rommel Custodio - Jan. 30, 2013, 12:06 a.m.
Dear Michal Simek

Michal Simek <michal.simek <at> xilinx.com> writes:

> 
> Fix one printf compilation warning in microblaze bdinfo part.
> 
> Warning log:
> cmd_bdinfo.c: In function 'do_bdinfo':
> cmd_bdinfo.c:219:2: warning: format '%u' expects argument of type
> 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]
> 
> Signed-off-by: Michal Simek <michal.simek <at> xilinx.com>
> ---
>  common/cmd_bdinfo.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

I build tested these series of Xilinx patches on an ml507.
This doesn't apply cleanly to HEAD.

All the best,
Rommel

Patch

diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 65a5e08..28b5241 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -216,7 +216,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #if defined(CONFIG_CMD_NET)
 	print_eths();
 #endif
-	printf("baudrate    = %u bps\n", (ulong)bd->bi_baudrate);
+	printf("baudrate    = %u bps\n", bd->bi_baudrate);
 	return 0;
 }