* [PATCH] mtd: use correct format specifier
@ 2012-09-07 8:31 Jan Luebbe
2012-09-07 9:25 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 2+ messages in thread
From: Jan Luebbe @ 2012-09-07 8:31 UTC (permalink / raw)
To: barebox
For the size_t type the format specifier %zu or %zx must be used.
See Documentation/printk-formats.txt in the kernel for details.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
drivers/mtd/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index a6132e8..68ab70d 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -79,7 +79,7 @@ static ssize_t mtd_write(struct cdev* cdev, const void *buf, size_t _count,
return -EINVAL;
}
- dev_dbg(cdev->dev, "write: 0x%08lx 0x%08lx\n", offset, count);
+ dev_dbg(cdev->dev, "write: offset: 0x%08lx count: 0x%zx\n", offset, count);
while (count) {
now = count > mtd->writesize ? mtd->writesize : count;
@@ -100,7 +100,7 @@ static ssize_t mtd_write(struct cdev* cdev, const void *buf, size_t _count,
ret = mtd->write(mtd, offset, now, &retlen,
buf);
dev_dbg(cdev->dev,
- "offset: 0x%08lx now: 0x%08lx retlen: 0x%08lx\n",
+ "offset: 0x%08lx now: 0x%zx retlen: 0x%zx\n",
offset, now, retlen);
}
if (ret)
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: use correct format specifier
2012-09-07 8:31 [PATCH] mtd: use correct format specifier Jan Luebbe
@ 2012-09-07 9:25 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-07 9:25 UTC (permalink / raw)
To: Jan Luebbe; +Cc: barebox
On 10:31 Fri 07 Sep , Jan Luebbe wrote:
> For the size_t type the format specifier %zu or %zx must be used.
> See Documentation/printk-formats.txt in the kernel for details.
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
can you fix
/opt/work/barebox/drivers/mtd/mtdraw.c: In function 'mtdraw_read':
/opt/work/barebox/drivers/mtd/mtdraw.c:140:3: warning: format '%lu' expects
type 'long unsigned int', but argument 2 has type 'ssize_t'
too
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-07 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 8:31 [PATCH] mtd: use correct format specifier Jan Luebbe
2012-09-07 9:25 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox