* [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
* [PATCH 2/2] mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST
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 ` 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
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Brian Norris @ 2015-10-12 20:35 UTC (permalink / raw)
To: linux-mtd; +Cc: Han Xu, Brian Norris
This driver doesn't actually need ARCH_MXC to compile. Relax the
constraints.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Han Xu <han.xu@freescale.com>
---
drivers/mtd/spi-nor/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
index 89bf4c1faa2b..2fe2a7e90fa9 100644
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -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
--
2.6.0.rc2.230.g3dd15c0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t
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:10 ` Han Xu
2015-10-13 21:22 ` Han Xu
2015-10-14 1:36 ` Brian Norris
3 siblings, 0 replies; 6+ messages in thread
From: Han Xu @ 2015-10-13 21:10 UTC (permalink / raw)
To: Brian Norris; +Cc: linux-mtd
On Mon, Oct 12, 2015 at 01:35:15PM -0700, Brian Norris wrote:
> 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);
>
Acked-by: Han xu <han.xu@freescale.com>
> --
> 2.6.0.rc2.230.g3dd15c0
>
--
Best Regards,
Han "Allen" Xu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t
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: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
3 siblings, 0 replies; 6+ messages in thread
From: Han Xu @ 2015-10-13 21:22 UTC (permalink / raw)
To: Brian Norris; +Cc: linux-mtd@lists.infradead.org, Han Xu
On Mon, Oct 12, 2015 at 3:35 PM, Brian Norris
<computersforpeace@gmail.com> wrote:
> 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);
>
Acked-by: Han xu <han.xu@freescale.com>
> --
> 2.6.0.rc2.230.g3dd15c0
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST
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
0 siblings, 0 replies; 6+ messages in thread
From: Han Xu @ 2015-10-13 21:22 UTC (permalink / raw)
To: Brian Norris; +Cc: linux-mtd@lists.infradead.org, Han Xu
On Mon, Oct 12, 2015 at 3:35 PM, Brian Norris
<computersforpeace@gmail.com> wrote:
> This driver doesn't actually need ARCH_MXC to compile. Relax the
> constraints.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Han Xu <han.xu@freescale.com>
> ---
> drivers/mtd/spi-nor/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
> index 89bf4c1faa2b..2fe2a7e90fa9 100644
> --- a/drivers/mtd/spi-nor/Kconfig
> +++ b/drivers/mtd/spi-nor/Kconfig
> @@ -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
Acked-by: Han xu <han.xu@freescale.com>
> --
> 2.6.0.rc2.230.g3dd15c0
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t
2015-10-12 20:35 [PATCH 1/2] mtd: fsl-quadspi: fix printk() format warning for size_t Brian Norris
` (2 preceding siblings ...)
2015-10-13 21:22 ` Han Xu
@ 2015-10-14 1:36 ` Brian Norris
3 siblings, 0 replies; 6+ messages in thread
From: Brian Norris @ 2015-10-14 1:36 UTC (permalink / raw)
To: linux-mtd; +Cc: Han Xu
On Mon, Oct 12, 2015 at 01:35:15PM -0700, Brian Norris wrote:
> 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>
Pushed both to l2-mtd.git
^ permalink raw reply [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).