From: Randy Dunlap <randy.dunlap@oracle.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org, akpm <akpm@linux-foundation.org>
Subject: [PATCH -next] mtd: fix m25p80 printk formats
Date: Mon, 15 Dec 2008 15:36:26 -0800 [thread overview]
Message-ID: <4946E9FA.6030607@oracle.com> (raw)
In-Reply-To: <20081216020642.fc1007d9.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix printk format warnings:
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:172: warning: format '%d' expects type 'int', but argument 4 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:236: warning: format '%d' expects type 'int', but argument 6 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:680: warning: format '%d' expects type 'int', but argument 5 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:683: warning: format '%.8x' expects type 'unsigned int', but argument 3 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:683: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:693: warning: format '%.8x' expects type 'unsigned int', but argument 3 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:724: warning: format '%.8x' expects type 'unsigned int', but argument 4 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:724: warning: format '%.8x' expects type 'unsigned int', but argument 5 has type 'uint64_t'
build-r7150.out:/local/linsrc/linux-next-20081215/drivers/mtd/devices/m25p80.c:724: warning: format '%u' expects type 'unsigned int', but argument 6 has type 'uint64_t'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/mtd/devices/m25p80.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
--- linux-next-20081215.orig/drivers/mtd/devices/m25p80.c
+++ linux-next-20081215/drivers/mtd/devices/m25p80.c
@@ -169,9 +169,9 @@ static int wait_till_ready(struct m25p *
*/
static int erase_chip(struct m25p *flash)
{
- DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n",
+ DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lluKiB\n",
dev_name(&flash->spi->dev), __func__,
- flash->mtd.size / 1024);
+ (unsigned long long)flash->mtd.size / 1024);
/* Wait until finished previous write command. */
if (wait_till_ready(flash))
@@ -233,9 +233,9 @@ static int m25p80_erase(struct mtd_info
struct m25p *flash = mtd_to_m25p(mtd);
u32 addr,len;
- DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %d\n",
+ DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %u\n",
dev_name(&flash->spi->dev), __func__, "at",
- (u32)instr->addr, instr->len);
+ (u32)instr->addr, (u32)instr->len);
/* sanity checks */
if (instr->addr + instr->len > flash->mtd.size)
@@ -677,24 +677,26 @@ static int __devinit m25p_probe(struct s
flash->mtd.erasesize = info->sector_size;
}
- dev_info(&spi->dev, "%s (%d Kbytes)\n", info->name,
- flash->mtd.size / 1024);
+ dev_info(&spi->dev, "%s (%llu Kbytes)\n", info->name,
+ (unsigned long long)flash->mtd.size / 1024);
DEBUG(MTD_DEBUG_LEVEL2,
- "mtd .name = %s, .size = 0x%.8x (%uMiB) "
+ "mtd .name = %s, .size = 0x%.8llx (%lluMiB) "
".erasesize = 0x%.8x (%uKiB) .numeraseregions = %d\n",
flash->mtd.name,
- flash->mtd.size, flash->mtd.size / (1024*1024),
+ (unsigned long long)flash->mtd.size,
+ (unsigned long long)flash->mtd.size / (1024*1024),
flash->mtd.erasesize, flash->mtd.erasesize / 1024,
flash->mtd.numeraseregions);
if (flash->mtd.numeraseregions)
for (i = 0; i < flash->mtd.numeraseregions; i++)
DEBUG(MTD_DEBUG_LEVEL2,
- "mtd.eraseregions[%d] = { .offset = 0x%.8x, "
+ "mtd.eraseregions[%d] = { .offset = 0x%.8llx, "
".erasesize = 0x%.8x (%uKiB), "
- ".numblocks = %d }\n",
- i, flash->mtd.eraseregions[i].offset,
+ ".numblocks = %d }\n", i,
+ (unsigned long long)
+ flash->mtd.eraseregions[i].offset,
flash->mtd.eraseregions[i].erasesize,
flash->mtd.eraseregions[i].erasesize / 1024,
flash->mtd.eraseregions[i].numblocks);
@@ -722,12 +724,12 @@ static int __devinit m25p_probe(struct s
if (nr_parts > 0) {
for (i = 0; i < nr_parts; i++) {
DEBUG(MTD_DEBUG_LEVEL2, "partitions[%d] = "
- "{.name = %s, .offset = 0x%.8x, "
- ".size = 0x%.8x (%uKiB) }\n",
+ "{.name = %s, .offset = 0x%.8llx, "
+ ".size = 0x%.8llx (%lluKiB) }\n",
i, parts[i].name,
- parts[i].offset,
- parts[i].size,
- parts[i].size / 1024);
+ (unsigned long long)parts[i].offset,
+ (unsigned long long)parts[i].size,
+ (unsigned long long)(parts[i].size / 1024));
}
flash->partitioned = 1;
return add_mtd_partitions(&flash->mtd, parts, nr_parts);
next prev parent reply other threads:[~2008-12-15 23:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 15:06 linux-next: Tree for December 15 Stephen Rothwell
2008-12-15 19:22 ` linux-next: Tree for December 15 (netlabel) Randy Dunlap
2008-12-15 21:35 ` Paul Moore
2008-12-15 19:26 ` linux-next: Tree for December 15 (mfd) Randy Dunlap
2008-12-17 19:43 ` Randy Dunlap
2008-12-18 9:45 ` Samuel Ortiz
2008-12-18 10:57 ` Samuel Ortiz
2008-12-18 11:02 ` David Brownell
2008-12-15 23:27 ` linux-next: Tree for December 15 (MTD) Randy Dunlap
2008-12-15 23:33 ` [PATCH -next] mtd: fix dataflash printk formats Randy Dunlap
2008-12-15 23:36 ` Randy Dunlap [this message]
2008-12-15 23:37 ` [PATCH -next] mtd: fix nandsim sched.h references Randy Dunlap
2008-12-15 23:38 ` [PATCH -next] mtd: fix nettel printk formats Randy Dunlap
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=4946E9FA.6030607@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).