public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [patch] mtd: nand: fix printk() warnings
@ 2012-01-31  8:54 Dan Carpenter
  2012-01-31 18:40 ` Randy Dunlap
  2012-02-03  9:16 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-01-31  8:54 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Robert Jarzmik, kernel-janitors, Mike Dunn, linux-mtd

Gcc complains here:
drivers/mtd/nand/docg4.c: In function ‘probe_docg4’:
drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]

We have a standard way of printing these using a format string
extension.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index 3ec1d10..8a0d7f6 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -1272,9 +1272,7 @@ static int __init probe_docg4(struct platform_device *pdev)
 
 	virtadr = ioremap(r->start, resource_size(r));
 	if (!virtadr) {
-		dev_err(dev, "Diskonchip ioremap failed: "
-			"0x%x bytes at 0x%x\n",
-			resource_size(r), r->start);
+		dev_err(dev, "Diskonchip ioremap failed: %pR\n", r);
 		return -EIO;
 	}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-03  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-31  8:54 [patch] mtd: nand: fix printk() warnings Dan Carpenter
2012-01-31 18:40 ` Randy Dunlap
2012-02-03  9:16 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox