linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t
@ 2015-10-12 20:35 Brian Norris
  2015-10-12 20:35 ` [PATCH 2/2] mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST Brian Norris
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Brian Norris @ 2015-10-12 20:35 UTC (permalink / raw)
  To: linux-mtd; +Cc: Han Xu, Brian Norris

Seen when compile-testing on non-32-bit arch:

    CC      drivers/mtd/spi-nor/fsl-quadspi.o
  drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_read':
  drivers/mtd/spi-nor/fsl-quadspi.c:873:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t' [-Wformat=]
    dev_dbg(q->dev, "cmd [%x],read from 0x%p, len:%d\n",
    ^

Also drop the '0x' prefixing to the '%p' formatter, since %p already
knows how to format pointers appropriately.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Han Xu <han.xu@freescale.com>
---
 drivers/mtd/spi-nor/fsl-quadspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 2954f89fc8be..ca259faf4591 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -868,7 +868,7 @@ static int fsl_qspi_read(struct spi_nor *nor, loff_t from,
 		}
 	}
 
-	dev_dbg(q->dev, "cmd [%x],read from 0x%p, len:%d\n",
+	dev_dbg(q->dev, "cmd [%x],read from %p, len:%zd\n",
 		cmd, q->ahb_addr + q->chip_base_addr + from - q->memmap_offs,
 		len);
 
-- 
2.6.0.rc2.230.g3dd15c0

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

end of thread, other threads:[~2015-10-14  1:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 20:35 [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t Brian Norris
2015-10-12 20:35 ` [PATCH 2/2] mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST Brian Norris
2015-10-13 21:22   ` Han Xu
2015-10-13 21:10 ` [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t Han Xu
2015-10-13 21:22 ` Han Xu
2015-10-14  1:36 ` Brian Norris

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).