Patchwork [U-Boot,04/10] GCC4.6: Squash warnings in tqm834x.c

login
register
mail settings
Submitter Marek Vasut
Date Oct. 25, 2011, 9:38 a.m.
Message ID <1319535510-20737-5-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/121530/
State Accepted
Headers show

Comments

Marek Vasut - Oct. 25, 2011, 9:38 a.m.
tqm834x.c: In function 'initdram':
tqm834x.c:126: warning: format '%d' expects type 'int', but argument 3 has type
'long int'
tqm834x.c: In function 'set_cs_bounds':
tqm834x.c:336: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'long int'
tqm834x.c:336: warning: format '%08x' expects type 'unsigned int', but argument
3 has type 'long int'
tqm834x.c: In function 'set_cs_config':
tqm834x.c:354: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'long int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 board/tqc/tqm834x/tqm834x.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Wolfgang Denk - Oct. 27, 2011, 9:57 p.m.
Dear Marek Vasut,

In message <1319535510-20737-5-git-send-email-marek.vasut@gmail.com> you wrote:
> tqm834x.c: In function 'initdram':
> tqm834x.c:126: warning: format '%d' expects type 'int', but argument 3 has type
> 'long int'
> tqm834x.c: In function 'set_cs_bounds':
> tqm834x.c:336: warning: format '%08x' expects type 'unsigned int', but argument
> 2 has type 'long int'
> tqm834x.c:336: warning: format '%08x' expects type 'unsigned int', but argument
> 3 has type 'long int'
> tqm834x.c: In function 'set_cs_config':
> tqm834x.c:354: warning: format '%08x' expects type 'unsigned int', but argument
> 2 has type 'long int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  board/tqc/tqm834x/tqm834x.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 260e392..7af8b4c 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -123,7 +123,7 @@  phys_size_t initdram (int board_type)
 			(long *)(CONFIG_SYS_DDR_BASE + size));
 		size += bank_size;
 
-		debug("DDR Bank%d size: %d MiB\n\n", cs, bank_size >> 20);
+		debug("DDR Bank%d size: %ld MiB\n\n", cs, bank_size >> 20);
 
 		/* exit if less than one bank */
 		if(size < DDR_MAX_SIZE_PER_CS) break;
@@ -333,7 +333,7 @@  static long int get_ddr_bank_size(short cs, long *base)
  */
 static void set_cs_bounds(short cs, long base, long size)
 {
-	debug("Setting bounds %08x, %08x for cs %d\n", base, size, cs);
+	debug("Setting bounds %08lx, %08lx for cs %d\n", base, size, cs);
 	if(size == 0){
 		im->ddr.csbnds[cs].csbnds = 0x00000000;
 	} else {
@@ -351,7 +351,7 @@  static void set_cs_bounds(short cs, long base, long size)
  */
 static void set_cs_config(short cs, long config)
 {
-	debug("Setting config %08x for cs %d\n", config, cs);
+	debug("Setting config %08lx for cs %d\n", config, cs);
 	im->ddr.cs_config[cs] = config;
 	SYNC;
 }