[U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c

Marek Vasut marek.vasut at gmail.com
Tue Oct 25 11:39:57 CEST 2011


pxa_mmc.c: In function 'mmc_cmd':
pxa_mmc.c:77:2: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'ulong'
pxa_mmc.c: In function 'mmc_block_read':
pxa_mmc.c:110:2: warning: format '%d' expects type 'int', but argument 4 has
type 'ulong'
pxa_mmc.c: In function 'pxa_mmc_write':
pxa_mmc.c:327:2: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:349:2: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:354:3: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:362:2: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:367:3: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'

Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Simon Glass <sjg at chromium.org>
Cc: Mike Frysinger <vapier at gentoo.org>
---
 drivers/mmc/pxa_mmc.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/pxa_mmc.c b/drivers/mmc/pxa_mmc.c
index 48e21ef..3c2905c 100644
--- a/drivers/mmc/pxa_mmc.c
+++ b/drivers/mmc/pxa_mmc.c
@@ -55,7 +55,7 @@ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
 /****************************************************/
 {
 	static uint32_t resp[4], a, b, c;
-	ulong status;
+	uint32_t status;
 	int i;
 
 	debug("mmc_cmd %u 0x%04x 0x%04x 0x%04x\n", cmd, argh, argl,
@@ -97,7 +97,7 @@ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
 
 int
 /****************************************************/
-mmc_block_read(uchar * dst, ulong src, ulong len)
+mmc_block_read(uchar * dst, uint32_t src, int len)
 /****************************************************/
 {
 	ushort argh, argl;
@@ -107,7 +107,7 @@ mmc_block_read(uchar * dst, ulong src, ulong len)
 		return 0;
 	}
 
-	debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong) dst, src, len);
+	debug("mmc_block_rd dst %p src %08x len %d\n", dst, src, len);
 
 	argh = len >> 16;
 	argl = len & 0xffff;
@@ -298,7 +298,7 @@ pxa_mmc_read(long src, uchar * dst, int size)
 
 int
 /****************************************************/
-pxa_mmc_write(uchar * src, ulong dst, int size)
+pxa_mmc_write(uchar * src, uint32_t dst, int size)
 /****************************************************/
 {
 	ulong end, part_start, part_end, part_len, aligned_start, aligned_end;
@@ -325,14 +325,14 @@ pxa_mmc_write(uchar * src, ulong dst, int size)
 
 	/* all block aligned accesses */
 	debug
-	    ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-	     src, (ulong) dst, end, part_start, part_end, aligned_start,
+	    ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+	     src, dst, end, part_start, part_end, aligned_start,
 	     aligned_end);
 	if (part_start) {
 		part_len = mmc_block_size - part_start;
 		debug
-		    ("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-		     (ulong) src, dst, end, part_start, part_end, aligned_start,
+		    ("ps src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+		     src, dst, end, part_start, part_end, aligned_start,
 		     aligned_end);
 		if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
 		    0) {
@@ -347,26 +347,26 @@ pxa_mmc_write(uchar * src, ulong dst, int size)
 		src += part_len;
 	}
 	debug
-	    ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-	     src, (ulong) dst, end, part_start, part_end, aligned_start,
+	    ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+	     src, dst, end, part_start, part_end, aligned_start,
 	     aligned_end);
 	for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size) {
 		debug
-		    ("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-		     src, (ulong) dst, end, part_start, part_end, aligned_start,
+		    ("al src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+		     src, dst, end, part_start, part_end, aligned_start,
 		     aligned_end);
 		if ((mmc_block_write(dst, (uchar *) src, mmc_block_size)) < 0) {
 			return -1;
 		}
 	}
 	debug
-	    ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-	     src, (ulong) dst, end, part_start, part_end, aligned_start,
+	    ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+	     src, dst, end, part_start, part_end, aligned_start,
 	     aligned_end);
 	if (part_end && dst < end) {
 		debug
-		    ("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-		     src, (ulong) dst, end, part_start, part_end, aligned_start,
+		    ("pe src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+		     src, dst, end, part_start, part_end, aligned_start,
 		     aligned_end);
 		if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) {
 			return -1;
-- 
1.7.6.3



More information about the U-Boot mailing list