Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463766 > unrolled thread

[PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data

Started byLABBE Corentin <clabbe.montjoie@gmail.com>
First post2016-08-16 15:00 +0200
Last post2016-08-19 20:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-08-16 15:00 +0200
    Re: [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data Han Xu <xhnjupt@gmail.com> - 2016-08-19 20:20 +0200

#1463766 — [PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data

FromLABBE Corentin <clabbe.montjoie@gmail.com>
Date2016-08-16 15:00 +0200
Subject[PATCH] mtd: spi-nor: constify fsl_qspi_devtype_data
Message-ID<s6M8h-3cC-21@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1466603

FromHan Xu <xhnjupt@gmail.com>
Date2016-08-19 20:20 +0200
Message-ID<s7WyB-Af-1@gated-at.bofh.it>
In reply to#1463766
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web