All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data
@ 2016-08-16 12:56 LABBE Corentin
  2016-08-19 18:01 ` Han Xu
  2016-11-28  8:29 ` Cyrille Pitchen
  0 siblings, 2 replies; 3+ messages in thread
From: LABBE Corentin @ 2016-08-16 12:56 UTC (permalink / raw)
  To: computersforpeace, dwmw2, han.xu; +Cc: linux-kernel, linux-mtd, LABBE Corentin

All fsl_qspi_devtype_data structures are never modified.
This patch constify them.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 5c82e4e..b4d8953 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -224,7 +224,7 @@ struct fsl_qspi_devtype_data {
 	int driver_data;
 };
 
-static struct fsl_qspi_devtype_data vybrid_data = {
+static const struct fsl_qspi_devtype_data vybrid_data = {
 	.devtype = FSL_QUADSPI_VYBRID,
 	.rxfifo = 128,
 	.txfifo = 64,
@@ -232,7 +232,7 @@ static struct fsl_qspi_devtype_data vybrid_data = {
 	.driver_data = QUADSPI_QUIRK_SWAP_ENDIAN,
 };
 
-static struct fsl_qspi_devtype_data imx6sx_data = {
+static const struct fsl_qspi_devtype_data imx6sx_data = {
 	.devtype = FSL_QUADSPI_IMX6SX,
 	.rxfifo = 128,
 	.txfifo = 512,
@@ -241,7 +241,7 @@ static struct fsl_qspi_devtype_data imx6sx_data = {
 		       | QUADSPI_QUIRK_TKT245618,
 };
 
-static struct fsl_qspi_devtype_data imx7d_data = {
+static const struct fsl_qspi_devtype_data imx7d_data = {
 	.devtype = FSL_QUADSPI_IMX7D,
 	.rxfifo = 512,
 	.txfifo = 512,
@@ -250,7 +250,7 @@ static struct fsl_qspi_devtype_data imx7d_data = {
 		       | QUADSPI_QUIRK_4X_INT_CLK,
 };
 
-static struct fsl_qspi_devtype_data imx6ul_data = {
+static const struct fsl_qspi_devtype_data imx6ul_data = {
 	.devtype = FSL_QUADSPI_IMX6UL,
 	.rxfifo = 128,
 	.txfifo = 512,
-- 
2.7.3

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

* Re: [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data
  2016-08-16 12:56 [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data LABBE Corentin
@ 2016-08-19 18:01 ` Han Xu
  2016-11-28  8:29 ` Cyrille Pitchen
  1 sibling, 0 replies; 3+ messages in thread
From: Han Xu @ 2016-08-19 18:01 UTC (permalink / raw)
  To: LABBE Corentin; +Cc: computersforpeace, dwmw2, han.xu, linux-mtd, linux-kernel

On Tue, Aug 16, 2016 at 02:56:38PM +0200, LABBE Corentin wrote:
> All fsl_qspi_devtype_data structures are never modified.
> This patch constify them.
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> ---
>  drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index 5c82e4e..b4d8953 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -224,7 +224,7 @@ struct fsl_qspi_devtype_data {
>  	int driver_data;
>  };
>  
> -static struct fsl_qspi_devtype_data vybrid_data = {
> +static const struct fsl_qspi_devtype_data vybrid_data = {
>  	.devtype = FSL_QUADSPI_VYBRID,
>  	.rxfifo = 128,
>  	.txfifo = 64,
> @@ -232,7 +232,7 @@ static struct fsl_qspi_devtype_data vybrid_data = {
>  	.driver_data = QUADSPI_QUIRK_SWAP_ENDIAN,
>  };
>  
> -static struct fsl_qspi_devtype_data imx6sx_data = {
> +static const struct fsl_qspi_devtype_data imx6sx_data = {
>  	.devtype = FSL_QUADSPI_IMX6SX,
>  	.rxfifo = 128,
>  	.txfifo = 512,
> @@ -241,7 +241,7 @@ static struct fsl_qspi_devtype_data imx6sx_data = {
>  		       | QUADSPI_QUIRK_TKT245618,
>  };
>  
> -static struct fsl_qspi_devtype_data imx7d_data = {
> +static const struct fsl_qspi_devtype_data imx7d_data = {
>  	.devtype = FSL_QUADSPI_IMX7D,
>  	.rxfifo = 512,
>  	.txfifo = 512,
> @@ -250,7 +250,7 @@ static struct fsl_qspi_devtype_data imx7d_data = {
>  		       | QUADSPI_QUIRK_4X_INT_CLK,
>  };
>  
> -static struct fsl_qspi_devtype_data imx6ul_data = {
> +static const struct fsl_qspi_devtype_data imx6ul_data = {
>  	.devtype = FSL_QUADSPI_IMX6UL,
>  	.rxfifo = 128,
>  	.txfifo = 512,
> -- 
> 2.7.3
> 
Acked-by: Han Xu <han.xu@nxp.com>
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data
  2016-08-16 12:56 [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data LABBE Corentin
  2016-08-19 18:01 ` Han Xu
@ 2016-11-28  8:29 ` Cyrille Pitchen
  1 sibling, 0 replies; 3+ messages in thread
From: Cyrille Pitchen @ 2016-11-28  8:29 UTC (permalink / raw)
  To: LABBE Corentin, computersforpeace, dwmw2, han.xu; +Cc: linux-mtd, linux-kernel

Le 16/08/2016 à 14:56, LABBE Corentin a écrit :
> All fsl_qspi_devtype_data structures are never modified.
> This patch constify them.
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Applied to git://github.com/spi-nor/linux.git

Thanks!

> ---
>  drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> index 5c82e4e..b4d8953 100644
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -224,7 +224,7 @@ struct fsl_qspi_devtype_data {
>  	int driver_data;
>  };
>  
> -static struct fsl_qspi_devtype_data vybrid_data = {
> +static const struct fsl_qspi_devtype_data vybrid_data = {
>  	.devtype = FSL_QUADSPI_VYBRID,
>  	.rxfifo = 128,
>  	.txfifo = 64,
> @@ -232,7 +232,7 @@ static struct fsl_qspi_devtype_data vybrid_data = {
>  	.driver_data = QUADSPI_QUIRK_SWAP_ENDIAN,
>  };
>  
> -static struct fsl_qspi_devtype_data imx6sx_data = {
> +static const struct fsl_qspi_devtype_data imx6sx_data = {
>  	.devtype = FSL_QUADSPI_IMX6SX,
>  	.rxfifo = 128,
>  	.txfifo = 512,
> @@ -241,7 +241,7 @@ static struct fsl_qspi_devtype_data imx6sx_data = {
>  		       | QUADSPI_QUIRK_TKT245618,
>  };
>  
> -static struct fsl_qspi_devtype_data imx7d_data = {
> +static const struct fsl_qspi_devtype_data imx7d_data = {
>  	.devtype = FSL_QUADSPI_IMX7D,
>  	.rxfifo = 512,
>  	.txfifo = 512,
> @@ -250,7 +250,7 @@ static struct fsl_qspi_devtype_data imx7d_data = {
>  		       | QUADSPI_QUIRK_4X_INT_CLK,
>  };
>  
> -static struct fsl_qspi_devtype_data imx6ul_data = {
> +static const struct fsl_qspi_devtype_data imx6ul_data = {
>  	.devtype = FSL_QUADSPI_IMX6UL,
>  	.rxfifo = 128,
>  	.txfifo = 512,
> 

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

end of thread, other threads:[~2016-11-28  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 12:56 [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data LABBE Corentin
2016-08-19 18:01 ` Han Xu
2016-11-28  8:29 ` Cyrille Pitchen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.