linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST
@ 2017-05-04 19:39 Cyrille Pitchen
  2017-05-05  7:36 ` Ludovic BARRE
  2017-05-10  9:49 ` Cyrille Pitchen
  0 siblings, 2 replies; 3+ messages in thread
From: Cyrille Pitchen @ 2017-05-04 19:39 UTC (permalink / raw)
  To: marek.vasut, linux-mtd
  Cc: computersforpeace, dwmw2, boris.brezillon, richard, linux-kernel,
	Cyrille Pitchen, Ludovic Barre

This patch fixes some compiler errors:
- change format strings to use %zx for size_t
- add missing #include <linux/sizes.h>

Cc: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
---
 drivers/mtd/spi-nor/stm32-quadspi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/stm32-quadspi.c b/drivers/mtd/spi-nor/stm32-quadspi.c
index 1056e7408d2a..86c0931543c5 100644
--- a/drivers/mtd/spi-nor/stm32-quadspi.c
+++ b/drivers/mtd/spi-nor/stm32-quadspi.c
@@ -19,6 +19,7 @@
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
+#include <linux/sizes.h>
 
 #define QUADSPI_CR		0x00
 #define CR_EN			BIT(0)
@@ -375,7 +376,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len,
 	struct stm32_qspi_cmd cmd;
 	int err;
 
-	dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#x\n",
+	dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#zx\n",
 		nor->read_opcode, buf, (u32)from, len);
 
 	memset(&cmd, 0, sizeof(cmd));
@@ -402,7 +403,7 @@ static ssize_t stm32_qspi_write(struct spi_nor *nor, loff_t to, size_t len,
 	struct stm32_qspi_cmd cmd;
 	int err;
 
-	dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#x\n",
+	dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#zx\n",
 		nor->program_opcode, buf, (u32)to, len);
 
 	memset(&cmd, 0, sizeof(cmd));
-- 
2.9.3

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

* Re: [PATCH] mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST
  2017-05-04 19:39 [PATCH] mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST Cyrille Pitchen
@ 2017-05-05  7:36 ` Ludovic BARRE
  2017-05-10  9:49 ` Cyrille Pitchen
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic BARRE @ 2017-05-05  7:36 UTC (permalink / raw)
  To: Cyrille Pitchen, marek.vasut, linux-mtd
  Cc: computersforpeace, dwmw2, boris.brezillon, richard, linux-kernel


On 05/04/2017 09:39 PM, Cyrille Pitchen wrote:
> This patch fixes some compiler errors:
> - change format strings to use %zx for size_t
> - add missing #include <linux/sizes.h>
>
> Cc: Ludovic Barre <ludovic.barre@st.com>
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
> ---
>   drivers/mtd/spi-nor/stm32-quadspi.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/stm32-quadspi.c b/drivers/mtd/spi-nor/stm32-quadspi.c
> index 1056e7408d2a..86c0931543c5 100644
> --- a/drivers/mtd/spi-nor/stm32-quadspi.c
> +++ b/drivers/mtd/spi-nor/stm32-quadspi.c
> @@ -19,6 +19,7 @@
>   #include <linux/of_device.h>
>   #include <linux/platform_device.h>
>   #include <linux/reset.h>
> +#include <linux/sizes.h>
>   
>   #define QUADSPI_CR		0x00
>   #define CR_EN			BIT(0)
> @@ -375,7 +376,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len,
>   	struct stm32_qspi_cmd cmd;
>   	int err;
>   
> -	dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#x\n",
> +	dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#zx\n",
>   		nor->read_opcode, buf, (u32)from, len);
>   
>   	memset(&cmd, 0, sizeof(cmd));
> @@ -402,7 +403,7 @@ static ssize_t stm32_qspi_write(struct spi_nor *nor, loff_t to, size_t len,
>   	struct stm32_qspi_cmd cmd;
>   	int err;
>   
> -	dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#x\n",
> +	dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#zx\n",
>   		nor->program_opcode, buf, (u32)to, len);
>   
>   	memset(&cmd, 0, sizeof(cmd));
Reviewed-by: Ludovic Barre <ludovic.barre@st.com>

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

* Re: [PATCH] mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST
  2017-05-04 19:39 [PATCH] mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST Cyrille Pitchen
  2017-05-05  7:36 ` Ludovic BARRE
@ 2017-05-10  9:49 ` Cyrille Pitchen
  1 sibling, 0 replies; 3+ messages in thread
From: Cyrille Pitchen @ 2017-05-10  9:49 UTC (permalink / raw)
  To: marek.vasut, linux-mtd
  Cc: computersforpeace, dwmw2, boris.brezillon, richard, linux-kernel,
	Ludovic Barre

Le 04/05/2017 à 21:39, Cyrille Pitchen a écrit :
> This patch fixes some compiler errors:
> - change format strings to use %zx for size_t
> - add missing #include <linux/sizes.h>
> 
> Cc: Ludovic Barre <ludovic.barre@st.com>
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>

Applied to the github/spi-nor tree


> ---
>  drivers/mtd/spi-nor/stm32-quadspi.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/stm32-quadspi.c b/drivers/mtd/spi-nor/stm32-quadspi.c
> index 1056e7408d2a..86c0931543c5 100644
> --- a/drivers/mtd/spi-nor/stm32-quadspi.c
> +++ b/drivers/mtd/spi-nor/stm32-quadspi.c
> @@ -19,6 +19,7 @@
>  #include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
> +#include <linux/sizes.h>
>  
>  #define QUADSPI_CR		0x00
>  #define CR_EN			BIT(0)
> @@ -375,7 +376,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len,
>  	struct stm32_qspi_cmd cmd;
>  	int err;
>  
> -	dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#x\n",
> +	dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#zx\n",
>  		nor->read_opcode, buf, (u32)from, len);
>  
>  	memset(&cmd, 0, sizeof(cmd));
> @@ -402,7 +403,7 @@ static ssize_t stm32_qspi_write(struct spi_nor *nor, loff_t to, size_t len,
>  	struct stm32_qspi_cmd cmd;
>  	int err;
>  
> -	dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#x\n",
> +	dev_dbg(dev, "write(%#.2x): buf:%p to:%#.8x len:%#zx\n",
>  		nor->program_opcode, buf, (u32)to, len);
>  
>  	memset(&cmd, 0, sizeof(cmd));
> 

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

end of thread, other threads:[~2017-05-10 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 19:39 [PATCH] mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST Cyrille Pitchen
2017-05-05  7:36 ` Ludovic BARRE
2017-05-10  9:49 ` Cyrille Pitchen

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