Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Colin King <colin.king@canonical.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Richard Weinberger <richard@nod.at>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd@lists.infradead.org, Han Xu <han.xu@nxp.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size
Date: Mon, 1 Jul 2019 09:14:00 +0200	[thread overview]
Message-ID: <20190701091352.3e3caf11@xps13> (raw)
In-Reply-To: <20190604105859.16627-1-colin.king@canonical.com>

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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Colin King <colin.king@canonical.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Richard Weinberger <richard@nod.at>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd@lists.infradead.org, Han Xu <han.xu@nxp.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size
Date: Mon, 1 Jul 2019 09:13:52 +0200	[thread overview]
Message-ID: <20190701091352.3e3caf11@xps13> (raw)
Message-ID: <20190701071352.LWktV_ouFujxA8nBEVAQmjRYaRsRXGrGZ_bf8ZhhSm4@z> (raw)
In-Reply-To: <20190604105859.16627-1-colin.king@canonical.com>

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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-07-01  7:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 10:58 [PATCH][next] mtd: rawnand: gpmi: remove double assignment to block_size Colin King
2019-07-01  7:14 ` Miquel Raynal [this message]
2019-07-01  7:13   ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190701091352.3e3caf11@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=colin.king@canonical.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=han.xu@nxp.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=s.hauer@pengutronix.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox