mtd: fsl-quadspi: fix printk() format warning for size_t
Subsystems (2)
PATCH 1/2 mtd: fsl-quadspi: fix printk() format warning for size_t
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.
--- drivers/mtd/spi-nor/fsl-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi-nor/fsl-quadspi.c +1 -1
@@ -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);
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
PATCH 2/2 mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST
This driver doesn't actually need ARCH_MXC to compile. Relax the constraints.
--- drivers/mtd/spi-nor/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/spi-nor/Kconfig +2 -1
@@ -23,7 +23,8 @@ config MTD_SPI_NOR_USE_4K_SECTORS config SPI_FSL_QUADSPI tristate "Freescale Quad SPI controller" - depends on ARCH_MXC + depends on ARCH_MXC || COMPILE_TEST + depends on HAS_IOMEM help This enables support for the Quad SPI controller in master mode. This controller does not support generic SPI. It only supports
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
Re: [PATCH 2/2] mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST
Quoted 14 lines · Brian Norris
This driver doesn't actually need
ARCH_MXCto compile. Relax the constraints.Signed-off-by Brian Norris <[email protected]>Cc Han Xu <[email protected]>--- drivers/mtd/spi-nor/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mtd/spi-nor/Kconfig +0
-0
drivers/mtd/spi-nor/Kconfig config MTD_SPI_NOR_USE_4K_SECTORS · line 30
Quoted 9 lines
drivers/mtd/spi-nor/Kconfig +2
-1@@ -23,7 +23,8 @@ config MTD_SPI_NOR_USE_4K_SECTORS config SPI_FSL_QUADSPI tristate "Freescale Quad SPI controller" - depends on ARCH_MXC + depends on ARCH_MXC || COMPILE_TEST + depends on HAS_IOMEM help This enables support for the Quad SPI controller in master mode. This controller does not support generic SPI. It only supports
Quoted 7 lines
--
2.6.0.rc2.230.g3dd15c0______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 22 lines · 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 <[email protected]>Cc Han Xu <[email protected]>--- drivers/mtd/spi-nor/fsl-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/spi-nor/fsl-quadspi.c +0
-0
drivers/mtd/spi-nor/fsl-quadspi.c static int fsl_qspi_read(struct spi_nor *nor, loff_t from, · line 874
Quoted 8 lines
drivers/mtd/spi-nor/fsl-quadspi.c +1
-1@@ -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);
Quoted 3 lines
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
Signature · 3 lines
Best Regards, Han "Allen" Xu
Quoted 22 lines · 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 <[email protected]>Cc Han Xu <[email protected]>--- drivers/mtd/spi-nor/fsl-quadspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mtd/spi-nor/fsl-quadspi.c +0
-0
drivers/mtd/spi-nor/fsl-quadspi.c static int fsl_qspi_read(struct spi_nor *nor, loff_t from, · line 874
Quoted 8 lines
drivers/mtd/spi-nor/fsl-quadspi.c +1
-1@@ -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);
Quoted 7 lines
--
2.6.0.rc2.230.g3dd15c0______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 5 lines · 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=]
Quoted 8 lines
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 <[email protected]>Cc Han Xu <[email protected]>
Pushed both to l2-mtd.git