Skip to content

Commit

Permalink
mtd: mtdswap: fix printk format warning
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Randy Dunlap authored and Artem Bityutskiy committed Apr 1, 2011
1 parent 0ce790e commit 2130ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/mtdswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2130ad3

Please sign in to comment.