Patchwork [U-Boot,01/10] GCC4.6: Squash warning in mpc5121ads.c

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

Comments

Marek Vasut - Oct. 25, 2011, 9:38 a.m.
mpc5121ads.c: In function 'misc_init_r':
mpc5121ads.c:256: warning: format '%02lx' expects type 'long unsigned int', but
argument 2 has type 'int'
mpc5121ads.c:263: warning: format '%02lx' expects type 'long unsigned int', but
argument 2 has type '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/freescale/mpc5121ads/mpc5121ads.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Wolfgang Denk - Oct. 27, 2011, 9:57 p.m.
Dear Marek Vasut,

In message <1319535510-20737-2-git-send-email-marek.vasut@gmail.com> you wrote:
> mpc5121ads.c: In function 'misc_init_r':
> mpc5121ads.c:256: warning: format '%02lx' expects type 'long unsigned int', but
> argument 2 has type 'int'
> mpc5121ads.c:263: warning: format '%02lx' expects type 'long unsigned int', but
> argument 2 has type '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/freescale/mpc5121ads/mpc5121ads.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/freescale/mpc5121ads/mpc5121ads.c b/board/freescale/mpc5121ads/mpc5121ads.c
index b356a47..97eeab3 100644
--- a/board/freescale/mpc5121ads/mpc5121ads.c
+++ b/board/freescale/mpc5121ads/mpc5121ads.c
@@ -253,14 +253,14 @@  int misc_init_r(void)
 	/* Verify if enabled */
 	tmp_val = 0;
 	i2c_read(0x38, 0x08, 1, &tmp_val, sizeof(tmp_val));
-	debug("DVI Encoder Read: 0x%02lx\n", tmp_val);
+	debug("DVI Encoder Read: 0x%02x\n", tmp_val);
 
 	tmp_val = 0x10;
 	i2c_write(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
 	/* Verify if enabled */
 	tmp_val = 0;
 	i2c_read(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
-	debug("DVI Encoder Read: 0x%02lx\n", tmp_val);
+	debug("DVI Encoder Read: 0x%02x\n", tmp_val);
 
 	return 0;
 }