diff options
author | Sanjeev Premi <premi@ti.com> | 2011-01-07 10:43:00 +0530 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-07 10:34:27 +0100 |
commit | d4b8e67fcd9eccdc908cbd851ffe4d4a8de0a60a (patch) | |
tree | 5e317060b1bcaafeddf43e39a305d7e2a5dc9c20 | |
parent | 1c267b02afaecb3c26eb6f386a1b05d010b38355 (diff) | |
download | barebox-d4b8e67fcd9eccdc908cbd851ffe4d4a8de0a60a.tar.gz barebox-d4b8e67fcd9eccdc908cbd851ffe4d4a8de0a60a.tar.xz |
nand: Fix warnings due to incompatible format strings
This patch fixes warnings due to incompatible format strings
specified in the printf().
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/nand/nand.c | 14 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c index 6a150fe0cb..08b5cc1512 100644 --- a/drivers/mtd/nand/nand.c +++ b/drivers/mtd/nand/nand.c @@ -37,7 +37,7 @@ static ssize_t nand_read(struct cdev *cdev, void* buf, size_t count, ulong offs size_t retlen; int ret; - debug("nand_read: 0x%08x 0x%08x\n", offset, count); + debug("nand_read: 0x%08lx 0x%08x\n", offset, count); ret = info->read(info, offset, count, &retlen, buf); @@ -70,17 +70,17 @@ static ssize_t nand_write(struct cdev* cdev, const void *buf, size_t _count, ulo size_t count = _count; if (NOTALIGNED(offset)) { - printf("offset 0x%08x not page aligned\n", offset); + printf("offset 0x%0lx not page aligned\n", offset); return -EINVAL; } - debug("write: 0x%08x 0x%08x\n", offset, count); + debug("write: 0x%08lx 0x%08x\n", offset, count); while (count) { now = count > info->writesize ? info->writesize : count; if (NOTALIGNED(now)) { - debug("not aligned: %d %d\n", info->writesize, (offset % info->writesize)); + debug("not aligned: %d %ld\n", info->writesize, (offset % info->writesize)); wrbuf = xmalloc(info->writesize); memset(wrbuf, 0xff, info->writesize); memcpy(wrbuf + (offset % info->writesize), buf, now); @@ -91,7 +91,7 @@ static ssize_t nand_write(struct cdev* cdev, const void *buf, size_t _count, ulo } else { if (!all_ff(buf, info->writesize)) ret = info->write(info, offset, now, &retlen, buf); - debug("offset: 0x%08x now: 0x%08x retlen: 0x%08x\n", offset, now, retlen); + debug("offset: 0x%08lx now: 0x%08x retlen: 0x%08x\n", offset, now, retlen); } if (ret) goto out; @@ -112,10 +112,10 @@ static int nand_ioctl(struct cdev *cdev, int request, void *buf) switch (request) { case MEMGETBADBLOCK: - debug("MEMGETBADBLOCK: 0x%08x\n", (off_t)buf); + debug("MEMGETBADBLOCK: 0x%08lx\n", (off_t)buf); return info->block_isbad(info, (off_t)buf); case MEMSETBADBLOCK: - debug("MEMSETBADBLOCK: 0x%08x\n", (off_t)buf); + debug("MEMSETBADBLOCK: 0x%08lx\n", (off_t)buf); return info->block_markbad(info, (off_t)buf); case MEMGETINFO: user->type = info->type; diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 56fafb035f..22d21277db 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -167,7 +167,7 @@ static void nand_select_chip(struct mtd_info *mtd, int chipnr) case 0: break; default: - printf("%s: illegal chip number %d\n", chipnr); + printf("%s: illegal chip number %d\n", __func__, chipnr); } } |