]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fix some more printf() format issues.
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 12 Jul 2008 12:36:34 +0000 (14:36 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 13 Jul 2008 14:55:00 +0000 (16:55 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
16 files changed:
board/armadillo/flash.c
board/delta/nand.c
board/integratorcp/flash.c
board/mp2usb/flash.c
board/versatile/flash.c
board/zylonite/nand.c
common/cmd_flash.c
common/cmd_nvedit.c
common/cmd_onenand.c
common/env_onenand.c
cpu/pxa/mmc.c
drivers/mtd/dataflash.c
drivers/net/smc911x.c
drivers/usb/usbdcore.c
fs/jffs2/jffs2_1pass.c
net/net.c

index 037a6430dabd7548efa9900fc1da86cfa758e88a..8518856cb1c3566c062893cb595a2ee5d1864f1a 100644 (file)
@@ -279,7 +279,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
        int i, rc;
 
        wp = (addr & ~1);       /* get lower word aligned address */
-       printf ("Writing %d short data to 0x%p from 0x%p.\n ", cnt, wp, src);
+       printf ("Writing %lu short data to 0x%lx from 0x%p.\n ", cnt, wp, src);
 
        /*
         * handle unaligned start bytes
index a635a6521bbadea397727607579d928ea218fa0a..5024056bc34352ada6232302d18a3f1755d49d23 100644 (file)
@@ -254,7 +254,7 @@ static unsigned long dfc_wait_event(unsigned long event)
                        break;
                }
                if(get_delta(start) > timeout) {
-                       DFC_DEBUG1("dfc_wait_event: TIMEOUT waiting for event: 0x%x.\n", event);
+                       DFC_DEBUG1("dfc_wait_event: TIMEOUT waiting for event: 0x%lx.\n", event);
                        return 0xff000000;
                }
 
index b653c058e1f593b0916deb310e956fe95636a800..59961cdab6efa0933a83eb7e65f17867dd1d20e1 100644 (file)
@@ -393,7 +393,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
                                                *addr = (FPW) 0x00D000D0;
                                        } else {
 #ifdef DEBUG
-                                               printf ("Timeout,0x%08x\n", status);
+                                               printf ("Timeout,0x%08lx\n", status);
 #else
                                                printf("Timeout\n");
 #endif
@@ -515,7 +515,7 @@ static int write_data (flash_info_t * info, ulong dest, FPW data)
 
        /* Check if Flash is (sufficiently) erased */
        if ((*addr & data) != data) {
-               printf ("not erased at %08lx (%x)\n", (ulong) addr, *addr);
+               printf ("not erased at %08lx (%lx)\n", (ulong) addr, *addr);
                return (2);
        }
 
@@ -542,7 +542,7 @@ static int write_data (flash_info_t * info, ulong dest, FPW data)
 #ifdef DEBUG
                        *addr = (FPW) 0x00700070;
                        status = *addr;
-                       printf("## status=0x%08x, addr=0x%08x\n", status, addr);
+                       printf("## status=0x%08lx, addr=0x%p\n", status, addr);
 #endif
                        *addr = (FPW) 0x00500050; /* clear status register cmd */
                        *addr = (FPW) 0x00FF00FF; /* restore read mode */
index 89ced163bb7aaf056f6aba012f2532576664329d..c19d445e20c1f7a41b9e4e299ffa49406d11f0a7 100644 (file)
@@ -426,7 +426,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
 
        /* Check if Flash is (sufficiently) erased */
        if ((*addr & data) != data) {
-               printf ("not erased at %08lx (%lx)\n", (ulong) addr, *addr);
+               printf ("not erased at %08lx (%lx)\n", (ulong) addr, (ulong) *addr);
                return (2);
        }
        /*
index ca77c8a29e82948100abc760be170d572ced8530..bbe5df724d870e54325c5d84eb6eda41ec13a045 100644 (file)
@@ -476,7 +476,7 @@ static int write_data (flash_info_t * info, ulong dest, FPW data)
 
        /* Check if Flash is (sufficiently) erased */
        if ((*addr & data) != data) {
-               printf ("not erased at %08lx (%x)\n", (ulong) addr, *addr);
+               printf ("not erased at %08lx (%lx)\n", (ulong) addr, (ulong) *addr);
                return (2);
        }
 
index aa3932ad2ddd375f74e905aa2aa5d96e5e2d6b12..ca165784324da17d886e54c366be01068f731895 100644 (file)
@@ -254,7 +254,7 @@ static unsigned long dfc_wait_event(unsigned long event)
                        break;
                }
                if(get_delta(start) > timeout) {
-                       DFC_DEBUG1("dfc_wait_event: TIMEOUT waiting for event: 0x%x.\n", event);
+                       DFC_DEBUG1("dfc_wait_event: TIMEOUT waiting for event: 0x%lx.\n", event);
                        return 0xff000000;
                }
 
index 9bd8074bfb39114779931dcdeface26b59b134bb..1dd0c99ff7acd980d0b83d051c5842ca9e926ac5 100644 (file)
@@ -342,7 +342,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        puts ("Bad sector specification\n");
                        return 1;
                }
-               printf ("Erase Flash Sectors %d-%d in Bank # %d ",
+               printf ("Erase Flash Sectors %d-%d in Bank # %ld ",
                        sect_first, sect_last, (info-flash_info)+1);
                rcode = flash_erase(info, sect_first, sect_last);
                return rcode;
@@ -534,7 +534,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        puts ("Bad sector specification\n");
                        return 1;
                }
-               printf("%sProtect Flash Sectors %d-%d in Bank # %d\n",
+               printf("%sProtect Flash Sectors %d-%d in Bank # %ld\n",
                        p ? "" : "Un-", sect_first, sect_last,
                        (info-flash_info)+1);
                for (i = sect_first; i <= sect_last; i++) {
index 85a0f94f0fec0a0a11d2d39fd8d95a25b3e2f2fa..aaf6d98da88c27497c59e85ef81702dfb96665e1 100644 (file)
@@ -99,7 +99,7 @@ int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        }
                }
 
-               printf("\nEnvironment size: %d/%d bytes\n", i, ENV_SIZE);
+               printf("\nEnvironment size: %d/%ld bytes\n", i, ENV_SIZE);
 
                return 0;
        }
index aff11d15c904d2944e77d7210d3fb1e1c1256fe1..ce99a38ca52174f4fea186d0cec02fded6fd198d 100644 (file)
@@ -70,14 +70,14 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        if (!end || end < 0)
                                end = start;
 
-                       printf("Erase block from %d to %d\n", start, end);
+                       printf("Erase block from %lu to %lu\n", start, end);
 
                        for (block = start; block <= end; block++) {
                                instr.addr = block << onenand_chip.erase_shift;
                                instr.len = 1 << onenand_chip.erase_shift;
                                ret = onenand_erase(&onenand_mtd, &instr);
                                if (ret) {
-                                       printf("erase failed %d\n", block);
+                                       printf("erase failed %lu\n", block);
                                        break;
                                }
                        }
index ac8a8c15e79fa85b81c33781722cc25a521e4271..ad5b1d7aa9dde3bd4da3d7429bc4e5c55caa915c 100644 (file)
@@ -103,7 +103,7 @@ int saveenv(void)
        instr.addr = env_addr;
        instr.addr -= (unsigned long)onenand_chip.base;
        if (onenand_erase(&onenand_mtd, &instr)) {
-               printf("OneNAND: erase failed at 0x%08x\n", env_addr);
+               printf("OneNAND: erase failed at 0x%08lx\n", env_addr);
                return 1;
        }
 
index 8c529a3717d854167df7331827783e7696204791..2c86a01a032e74b3ba95da2d856fa9be45f736ae 100644 (file)
@@ -535,8 +535,10 @@ static void mmc_decode_csd(uint32_t * resp)
        mmc_dev.removable = 0;
        mmc_dev.block_read = mmc_bread;
 
-       printf("Detected: %lu blocks of %lu bytes (%luMB) ", (unsigned long)mmc_dev.lba,
-              mmc_dev.blksz, mmc_dev.lba * mmc_dev.blksz / (1024 * 1024));
+       printf("Detected: %lu blocks of %lu bytes (%luMB) ",
+               mmc_dev.lba,
+               mmc_dev.blksz,
+               mmc_dev.lba * mmc_dev.blksz / (1024 * 1024));
 }
 
 int
index a092dc634fa7363e25cd1da93f404f522b4f7419..0ad48cdae91e7cd4a24835df61b8e2a54ca3c053 100644 (file)
@@ -173,7 +173,7 @@ void AT91F_DataflashSetEnv (void)
                        if((env & FLAG_SETENV) == FLAG_SETENV) {
                                start =
                                dataflash_info[i].Device.area_list[j].start;
-                               sprintf((char*) s,"%X",start);
+                               sprintf((char*) s,"%lX",start);
                                setenv((char*) area_list[part].label,(char*) s);
                        }
                        part++;
index 1484b0b69693bd6564b23cdeac177cf2d85934de..0fff8208036e15cd146d83112cb4db3486338c52 100644 (file)
@@ -597,7 +597,7 @@ int eth_init(bd_t *bd)
 
        val = reg_read(BYTE_TEST);
        if (val != 0x87654321) {
-               printf(DRIVERNAME ": Invalid chip endian 0x%08x\n", val);
+               printf(DRIVERNAME ": Invalid chip endian 0x%08lx\n", val);
                goto err_out;
        }
 
@@ -606,7 +606,7 @@ int eth_init(bd_t *bd)
                if (chip_ids[i].id == val) break;
        }
        if (!chip_ids[i].id) {
-               printf(DRIVERNAME ": Unknown chip ID %04x\n", val);
+               printf(DRIVERNAME ": Unknown chip ID %04lx\n", val);
                goto err_out;
        }
 
index a621ce7a399128e4451c2d6aa5c24de8a89f0eb1..58e710f36972e38d9235b1e0a6f1eedb8206e531 100644 (file)
@@ -551,7 +551,7 @@ struct urb *usbd_alloc_urb (struct usb_device_instance *device, struct usb_endpo
        struct urb *urb;
 
        if( !(urb = (struct urb*)malloc(sizeof(struct urb))) ) {
-         usberr(" F A T A L:  malloc(%u) FAILED!!!!", sizeof(struct urb));
+         usberr(" F A T A L:  malloc(%lu) FAILED!!!!", sizeof(struct urb));
          return NULL;
        }
 
index d1423c1cdae973b48055c71bbe4dcfcdf14cf293..c7db46e0532857c14764b73cfdfa5d3faa7f5794 100644 (file)
@@ -1213,12 +1213,12 @@ jffs2_1pass_build_lists(struct part_info * part)
                        } else if (node->nodetype == JFFS2_NODETYPE_CLEANMARKER) {
                                if (node->totlen != sizeof(struct jffs2_unknown_node))
                                        printf("OOPS Cleanmarker has bad size "
-                                               "%d != %d\n", node->totlen,
+                                               "%d != %lu\n", node->totlen,
                                                sizeof(struct jffs2_unknown_node));
                        } else if (node->nodetype == JFFS2_NODETYPE_PADDING) {
                                if (node->totlen < sizeof(struct jffs2_unknown_node))
                                        printf("OOPS Padding has bad size "
-                                               "%d < %d\n", node->totlen,
+                                               "%d < %lu\n", node->totlen,
                                                sizeof(struct jffs2_unknown_node));
                        } else {
                                printf("Unknown node type: %x len %d "
index 2a26bc0dd1d75ff03f22d5bcc0b1681691934c27..c96f566fab1ac8064e293b62b9400616a63bb77f 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -1390,7 +1390,7 @@ NetReceive(volatile uchar * inpkt, int len)
                puts ("Got IP\n");
 #endif
                if (len < IP_HDR_SIZE) {
-                       debug ("len bad %d < %d\n", len, IP_HDR_SIZE);
+                       debug ("len bad %d < %ld\n", len, IP_HDR_SIZE);
                        return;
                }
                if (len < ntohs(ip->ip_len)) {