2019-10-29 11:23:31

by Tudor Ambarus

[permalink] [raw]
Subject: [PATCH v3 18/32] mtd: spi-nor: Constify data to write to the Status Register

From: Tudor Ambarus <[email protected]>

Constify the data to write to the Status Register.

Signed-off-by: Tudor Ambarus <[email protected]>
---
drivers/mtd/spi-nor/spi-nor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 5fb4d953b5c7..274786e1988f 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -865,7 +865,7 @@ static int spi_nor_write_sr(struct spi_nor *nor, u8 val)
* second byte will be written to the configuration register.
* Return negative if error occurred.
*/
-static int spi_nor_write_sr_cr(struct spi_nor *nor, u8 *sr_cr)
+static int spi_nor_write_sr_cr(struct spi_nor *nor, const u8 *sr_cr)
{
int ret;

@@ -912,7 +912,7 @@ static int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 status_new,
return ((nor->bouncebuf[0] & mask) != (status_new & mask)) ? -EIO : 0;
}

-static int spi_nor_write_sr2(struct spi_nor *nor, u8 *sr2)
+static int spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2)
{
int ret;

--
2.9.5


2019-10-31 11:17:54

by Boris Brezillon

[permalink] [raw]
Subject: Re: [PATCH v3 18/32] mtd: spi-nor: Constify data to write to the Status Register

On Tue, 29 Oct 2019 11:17:17 +0000
<[email protected]> wrote:

> From: Tudor Ambarus <[email protected]>
>
> Constify the data to write to the Status Register.
>
> Signed-off-by: Tudor Ambarus <[email protected]>

Reviewed-by: Boris Brezillon <[email protected]>

> ---
> drivers/mtd/spi-nor/spi-nor.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 5fb4d953b5c7..274786e1988f 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -865,7 +865,7 @@ static int spi_nor_write_sr(struct spi_nor *nor, u8 val)
> * second byte will be written to the configuration register.
> * Return negative if error occurred.
> */
> -static int spi_nor_write_sr_cr(struct spi_nor *nor, u8 *sr_cr)
> +static int spi_nor_write_sr_cr(struct spi_nor *nor, const u8 *sr_cr)
> {
> int ret;
>
> @@ -912,7 +912,7 @@ static int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 status_new,
> return ((nor->bouncebuf[0] & mask) != (status_new & mask)) ? -EIO : 0;
> }
>
> -static int spi_nor_write_sr2(struct spi_nor *nor, u8 *sr2)
> +static int spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2)
> {
> int ret;
>

2019-11-02 10:49:47

by Tudor Ambarus

[permalink] [raw]
Subject: Re: [PATCH v3 18/32] mtd: spi-nor: Constify data to write to the Status Register



On 10/29/2019 01:17 PM, Tudor Ambarus - M18064 wrote:
> From: Tudor Ambarus <[email protected]>
>
> Constify the data to write to the Status Register.
>
> Signed-off-by: Tudor Ambarus <[email protected]>
> ---
> drivers/mtd/spi-nor/spi-nor.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to spi-nor/next. Thanks.