diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 10:17:41 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 10:17:41 -0500 |
commit | 89d8d32060de17c23f761df74799c7c07b79dd01 (patch) | |
tree | 408f3e584c8dc3548a2eda75b106dc72317d01f7 /drivers | |
parent | 629286b9561982e90a6d49893a1c641e71b6a2a3 (diff) |
mtd: fix printf format warnings, mostly lack of %zd for size_t, in mtdswap
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/mtdswap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index 57e6cc30bc42..a65594fee4a3 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c | |||
@@ -331,7 +331,7 @@ static int mtdswap_read_oob(struct mtdswap_dev *d, loff_t from, | |||
331 | 331 | ||
332 | if (ops->oobretlen < ops->ooblen) { | 332 | if (ops->oobretlen < ops->ooblen) { |
333 | dev_warn(d->dev, "Read OOB return short read (%zd bytes not " | 333 | dev_warn(d->dev, "Read OOB return short read (%zd bytes not " |
334 | "%d) for block at %08llx\n", | 334 | "%zd) for block at %08llx\n", |
335 | ops->oobretlen, ops->ooblen, from); | 335 | ops->oobretlen, ops->ooblen, from); |
336 | return -EIO; | 336 | return -EIO; |
337 | } | 337 | } |
@@ -421,7 +421,7 @@ static int mtdswap_write_marker(struct mtdswap_dev *d, struct swap_eb *eb, | |||
421 | 421 | ||
422 | if (ops.oobretlen != ops.ooblen) { | 422 | if (ops.oobretlen != ops.ooblen) { |
423 | dev_warn(d->dev, "Short OOB write for block at %08llx: " | 423 | dev_warn(d->dev, "Short OOB write for block at %08llx: " |
424 | "%zd not %d\n", | 424 | "%zd not %zd\n", |
425 | offset, ops.oobretlen, ops.ooblen); | 425 | offset, ops.oobretlen, ops.ooblen); |
426 | return ret; | 426 | return ret; |
427 | } | 427 | } |
@@ -705,13 +705,13 @@ retry: | |||
705 | } | 705 | } |
706 | 706 | ||
707 | if (ret < 0) { | 707 | if (ret < 0) { |
708 | dev_err(d->dev, "Write to MTD device failed: %d (%d written)", | 708 | dev_err(d->dev, "Write to MTD device failed: %d (%zd written)", |
709 | ret, retlen); | 709 | ret, retlen); |
710 | goto err; | 710 | goto err; |
711 | } | 711 | } |
712 | 712 | ||
713 | if (retlen != PAGE_SIZE) { | 713 | if (retlen != PAGE_SIZE) { |
714 | dev_err(d->dev, "Short write to MTD device: %d written", | 714 | dev_err(d->dev, "Short write to MTD device: %zd written", |
715 | retlen); | 715 | retlen); |
716 | ret = -EIO; | 716 | ret = -EIO; |
717 | goto err; | 717 | goto err; |
@@ -758,7 +758,7 @@ retry: | |||
758 | } | 758 | } |
759 | 759 | ||
760 | if (retlen != PAGE_SIZE) { | 760 | if (retlen != PAGE_SIZE) { |
761 | dev_err(d->dev, "Short read: %d (block %u)\n", retlen, | 761 | dev_err(d->dev, "Short read: %zd (block %u)\n", retlen, |
762 | oldblock); | 762 | oldblock); |
763 | ret = -EIO; | 763 | ret = -EIO; |
764 | goto read_error; | 764 | goto read_error; |
@@ -1188,7 +1188,7 @@ retry: | |||
1188 | } | 1188 | } |
1189 | 1189 | ||
1190 | if (retlen != PAGE_SIZE) { | 1190 | if (retlen != PAGE_SIZE) { |
1191 | dev_err(d->dev, "Short read %d\n", retlen); | 1191 | dev_err(d->dev, "Short read %zd\n", retlen); |
1192 | return -EIO; | 1192 | return -EIO; |
1193 | } | 1193 | } |
1194 | 1194 | ||
@@ -1304,7 +1304,7 @@ static int mtdswap_show(struct seq_file *s, void *data) | |||
1304 | seq_printf(s, "discarded pages count: %llu\n", d->discard_page_count); | 1304 | seq_printf(s, "discarded pages count: %llu\n", d->discard_page_count); |
1305 | 1305 | ||
1306 | seq_printf(s, "\n"); | 1306 | seq_printf(s, "\n"); |
1307 | seq_printf(s, "total pages: %lu\n", pages); | 1307 | seq_printf(s, "total pages: %u\n", pages); |
1308 | seq_printf(s, "pages mapped: %u\n", mapped); | 1308 | seq_printf(s, "pages mapped: %u\n", mapped); |
1309 | 1309 | ||
1310 | return 0; | 1310 | return 0; |
@@ -1458,7 +1458,7 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
1458 | oinfo = mtd->ecclayout; | 1458 | oinfo = mtd->ecclayout; |
1459 | if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) { | 1459 | if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) { |
1460 | printk(KERN_ERR "%s: Not enough free bytes in OOB, " | 1460 | printk(KERN_ERR "%s: Not enough free bytes in OOB, " |
1461 | "%d available, %u needed.\n", | 1461 | "%d available, %lu needed.\n", |
1462 | MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE); | 1462 | MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE); |
1463 | return; | 1463 | return; |
1464 | } | 1464 | } |