From: Randy Dunlap <randy.dunlap@oracle.com>
To: linux-mtd@lists.infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>
Subject: [PATCH] mtdswap: fix printk format warning
Date: Tue, 29 Mar 2011 12:35:23 -0700 [thread overview]
Message-ID: <20110329123523.74735727.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20110329131133.c74af94d.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
The number is actually a sizeof(), so using %zu for it builds
cleanly on 32-bit or 64-bit.
drivers/mtd/mtdswap.c:1456: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/mtd/mtdswap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20110329.orig/drivers/mtd/mtdswap.c
+++ linux-next-20110329/drivers/mtd/mtdswap.c
@@ -1452,7 +1452,7 @@ static void mtdswap_add_mtd(struct mtd_b
oinfo = mtd->ecclayout;
if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) {
printk(KERN_ERR "%s: Not enough free bytes in OOB, "
- "%d available, %lu needed.\n",
+ "%d available, %zu needed.\n",
MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE);
return;
}
next parent reply other threads:[~2011-03-29 19:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110329131133.c74af94d.sfr@canb.auug.org.au>
2011-03-29 19:35 ` Randy Dunlap [this message]
2011-04-01 8:30 ` [PATCH] mtdswap: fix printk format warning Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110329123523.74735727.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox