mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 07:03:31 +08:00
Fix some more printf() format issues.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
parent
18c8a28aad
commit
0a5676befb
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
/*
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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++) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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++;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user