mtd: docg4: fix printk() warnings

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Mar 26 20:59:06 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2c4ae276b13114a2c7ebac31257db391b4bf2b6f
Commit:     2c4ae276b13114a2c7ebac31257db391b4bf2b6f
Parent:     5289966ea576a062b80319975b31b661c196ff9d
Author:     Dan Carpenter <dan.carpenter at oracle.com>
AuthorDate: Tue Jan 31 11:54:06 2012 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Mar 27 00:21:44 2012 +0100

    mtd: docg4: fix printk() warnings
    
    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 at oracle.com>
    Acked-by: Randy Dunlap <rdunlap at xenotime.net>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/docg4.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index baae75b..9b3a649 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -1270,9 +1270,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;
 	}
 



More information about the linux-mtd-cvs mailing list