linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size
@ 2019-06-04 10:58 Colin King
  2019-07-01  7:13 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2019-06-04 10:58 UTC (permalink / raw)
  To: Sascha Hauer, Han Xu, Miquel Raynal, Richard Weinberger,
	David Woodhouse, Brian Norris, Marek Vasut, Vignesh Raghavendra,
	linux-mtd
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable block_size is being assigned to itself and to
geo->ecc_chunk_size.  Clean up the double assignment by removing
the assignment to itself.

Addresses-Coverity: ("Evaluation order violation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index 5db84178edff..334fe3130285 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -1428,7 +1428,7 @@ static void gpmi_bch_layout_std(struct gpmi_nand_data *this)
 	struct bch_geometry *geo = &this->bch_geometry;
 	unsigned int ecc_strength = geo->ecc_strength >> 1;
 	unsigned int gf_len = geo->gf_len;
-	unsigned int block_size = block_size = geo->ecc_chunk_size;
+	unsigned int block_size = geo->ecc_chunk_size;
 
 	this->bch_flashlayout0 =
 		BF_BCH_FLASH0LAYOUT0_NBLOCKS(geo->ecc_chunk_count - 1) |
-- 
2.20.1


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

* Re: [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size
  2019-06-04 10:58 [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size Colin King
@ 2019-07-01  7:13 ` Miquel Raynal
  2019-07-01  7:14   ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2019-07-01  7:13 UTC (permalink / raw)
  To: Colin King
  Cc: Sascha Hauer, Han Xu, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Vignesh Raghavendra, linux-mtd,
	kernel-janitors, linux-kernel

Hi Colin,

Colin King <colin.king@canonical.com> wrote on Tue,  4 Jun 2019
11:58:59 +0100:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable block_size is being assigned to itself and to
> geo->ecc_chunk_size.  Clean up the double assignment by removing
> the assignment to itself.
> 
> Addresses-Coverity: ("Evaluation order violation")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> index 5db84178edff..334fe3130285 100644
> --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> @@ -1428,7 +1428,7 @@ static void gpmi_bch_layout_std(struct gpmi_nand_data *this)
>  	struct bch_geometry *geo = &this->bch_geometry;
>  	unsigned int ecc_strength = geo->ecc_strength >> 1;
>  	unsigned int gf_len = geo->gf_len;
> -	unsigned int block_size = block_size = geo->ecc_chunk_size;
> +	unsigned int block_size = geo->ecc_chunk_size;
>  
>  	this->bch_flashlayout0 =
>  		BF_BCH_FLASH0LAYOUT0_NBLOCKS(geo->ecc_chunk_count - 1) |



Applied to nand/next, thanks.

Miquèl


Thanks,
Miquèl

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

* Re: [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size
  2019-07-01  7:13 ` Miquel Raynal
@ 2019-07-01  7:14   ` Miquel Raynal
  0 siblings, 0 replies; 3+ messages in thread
From: Miquel Raynal @ 2019-07-01  7:14 UTC (permalink / raw)
  To: Colin King
  Cc: Sascha Hauer, Han Xu, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Vignesh Raghavendra, linux-mtd,
	kernel-janitors, linux-kernel

Hi Colin,

Colin King <colin.king@canonical.com> wrote on Tue,  4 Jun 2019
11:58:59 +0100:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable block_size is being assigned to itself and to
> geo->ecc_chunk_size.  Clean up the double assignment by removing
> the assignment to itself.
> 
> Addresses-Coverity: ("Evaluation order violation")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> index 5db84178edff..334fe3130285 100644
> --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
> @@ -1428,7 +1428,7 @@ static void gpmi_bch_layout_std(struct gpmi_nand_data *this)
>  	struct bch_geometry *geo = &this->bch_geometry;
>  	unsigned int ecc_strength = geo->ecc_strength >> 1;
>  	unsigned int gf_len = geo->gf_len;
> -	unsigned int block_size = block_size = geo->ecc_chunk_size;
> +	unsigned int block_size = geo->ecc_chunk_size;
>  
>  	this->bch_flashlayout0 =
>  		BF_BCH_FLASH0LAYOUT0_NBLOCKS(geo->ecc_chunk_count - 1) |



Applied to nand/next, thanks.

Miquèl

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

end of thread, other threads:[~2019-07-01  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 10:58 [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size Colin King
2019-07-01  7:13 ` Miquel Raynal
2019-07-01  7:14   ` Miquel Raynal

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