mtd: mtdswap: fix printk format warning

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Apr 7 05:59:01 EDT 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2130ad32a03f8d2d772cbbd94eff5358d8ab9e33
Commit:     2130ad32a03f8d2d772cbbd94eff5358d8ab9e33
Parent:     0ce790e7d736cedc563e1fb4e998babf5a4dbc3d
Author:     Randy Dunlap <randy.dunlap at oracle.com>
AuthorDate: Tue Mar 29 12:35:23 2011 -0700
Committer:  Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
CommitDate: Fri Apr 1 16:44:31 2011 +0300

    mtd: mtdswap: fix printk format warning
    
    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 at oracle.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 drivers/mtd/mtdswap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index 237913c..fed215c 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1452,7 +1452,7 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 	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;
 	}



More information about the linux-mtd-cvs mailing list