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

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

Comments

Marek Vasut - Oct. 25, 2011, 9:39 a.m.
jedec_flash.c: In function 'fill_info':
jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'ulong'
jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
argument 3 has type 'ulong'
jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 2 has
type 'ulong'
jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 3 has
type 'ulong'

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/jedec_flash.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Wolfgang Denk - Oct. 27, 2011, 9:59 p.m.
Dear Marek Vasut,

In message <1319535604-20831-4-git-send-email-marek.vasut@gmail.com> you wrote:
> jedec_flash.c: In function 'fill_info':
> jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
> argument 2 has type 'ulong'
> jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
> argument 3 has type 'ulong'
> jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 2 has
> type 'ulong'
> jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 3 has
> type 'ulong'
> 
> 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/jedec_flash.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index da8c9b1..36d30c3 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -390,7 +390,8 @@  static inline void fill_info(flash_info_t *info, const struct amd_flash_info *je
 	debug("unlock address index %d\n", uaddr_idx);
 	info->addr_unlock1 = unlock_addrs[uaddr_idx].addr1;
 	info->addr_unlock2 = unlock_addrs[uaddr_idx].addr2;
-	debug("unlock addresses are 0x%x/0x%x\n", info->addr_unlock1, info->addr_unlock2);
+	debug("unlock addresses are 0x%lx/0x%lx\n",
+		info->addr_unlock1, info->addr_unlock2);
 
 	sect_cnt = 0;
 	total_size = 0;
@@ -399,7 +400,7 @@  static inline void fill_info(flash_info_t *info, const struct amd_flash_info *je
 		ulong erase_region_count = (jedec_entry->regions[i] & 0xff) + 1;
 
 		total_size += erase_region_size * erase_region_count;
-		debug ("erase_region_count = %d erase_region_size = %d\n",
+		debug("erase_region_count = %ld erase_region_size = %ld\n",
 		       erase_region_count, erase_region_size);
 		for (j = 0; j < erase_region_count; j++) {
 			if (sect_cnt >= CONFIG_SYS_MAX_FLASH_SECT) {