Patchwork [U-Boot,02/18] GCC4.6: Squash warning in cfi_flash.c

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

Comments

Marek Vasut - Oct. 25, 2011, 9:39 a.m.
cfi_flash.c: In function 'flash_protect_default':
cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'ulong'
cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'long unsigned 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>
Cc: Scott Wood <scottwood@freescale.com>
---
 drivers/mtd/cfi_flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Wolfgang Denk - Oct. 27, 2011, 9:59 p.m.
Dear Marek Vasut,

In message <1319535604-20831-3-git-send-email-marek.vasut@gmail.com> you wrote:
> cfi_flash.c: In function 'flash_protect_default':
> cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
> argument 2 has type 'ulong'
> cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
> argument 3 has type 'long unsigned 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>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
>  drivers/mtd/cfi_flash.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index ac91dfd..5494bcf 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -2149,7 +2149,7 @@  void flash_protect_default(void)
 
 #if defined(CONFIG_SYS_FLASH_AUTOPROTECT_LIST)
 	for (i = 0; i < (sizeof(apl) / sizeof(struct apl_s)); i++) {
-		debug("autoprotecting from %08x to %08x\n",
+		debug("autoprotecting from %08lx to %08lx\n",
 		      apl[i].start, apl[i].start + apl[i].size - 1);
 		flash_protect(FLAG_PROTECT_SET,
 			       apl[i].start,