summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-07-10 10:10:54 +0200
committerWolfgang Denk <wd@denx.de>2008-07-10 10:46:13 +0200
commite870690bdca154943ecadd5212d2d59c1b9d391b (patch)
treed4772ad4250e78550ec60d1dfb4fcc2362c63a4c /drivers
parent10943c9afa25694bd9999461f4e9e50ce22fff2b (diff)
downloadu-boot-imx-e870690bdca154943ecadd5212d2d59c1b9d391b.zip
u-boot-imx-e870690bdca154943ecadd5212d2d59c1b9d391b.tar.gz
u-boot-imx-e870690bdca154943ecadd5212d2d59c1b9d391b.tar.bz2
MTD/NAND: Fix printf format warning in nand code
This patch fixes NAND related printf format warning. Those warnings are now visible since patch dc4b0b38d4aadf08826f6c31270f1eecd27964fd [Fix printf errors.] by Andrew Klossner has been applied. Thanks, this is really helpful. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand.c2
-rw-r--r--drivers/mtd/nand/nand_util.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 27b5792..e44470e 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -70,7 +70,7 @@ void nand_init(void)
if (nand_curr_device == -1)
nand_curr_device = i;
}
- printf("%lu MiB\n", size / (1024 * 1024));
+ printf("%u MiB\n", size / (1024 * 1024));
#ifdef CFG_NAND_SELECT_DEVICE
/*
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index c82f77b..828cc33 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -154,7 +154,7 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
}
if (erase_length < meminfo->erasesize) {
- printf("Warning: Erase size 0x%08x smaller than one " \
+ printf("Warning: Erase size 0x%08lx smaller than one " \
"erase block 0x%08x\n",erase_length, meminfo->erasesize);
printf(" Erasing 0x%08x instead\n", meminfo->erasesize);
erase_length = meminfo->erasesize;
@@ -498,7 +498,7 @@ int nand_write_opts(nand_info_t *meminfo, const nand_write_options_t *opts)
* on (slow) serial consoles
*/
if (percent != percent_complete) {
- printf("\rWriting data at 0x%x "
+ printf("\rWriting data at 0x%lx "
"-- %3d%% complete.",
mtdoffset, percent);
percent_complete = percent;
@@ -678,7 +678,7 @@ int nand_read_opts(nand_info_t *meminfo, const nand_read_options_t *opts)
*/
if (percent != percent_complete) {
if (!opts->quiet)
- printf("\rReading data from 0x%x "
+ printf("\rReading data from 0x%lx "
"-- %3d%% complete.",
mtdoffset, percent);
percent_complete = percent;