From: Marek Vasut Date: Mon, 24 Oct 2011 23:39:57 +0000 (+0000) Subject: GCC4.6: Fix warnings in pxa_mmc.c X-Git-Tag: v2011.12-rc1~362 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a231f04f1ad4f07af78696f516a9719d5b3deb29;p=u-boot GCC4.6: Fix warnings in pxa_mmc.c 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 Cc: Wolfgang Denk Cc: Simon Glass Cc: Mike Frysinger --- diff --git a/drivers/mmc/pxa_mmc.c b/drivers/mmc/pxa_mmc.c index 48e21ef7a5..3c2905c3c6 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;