lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200911175514.766eeaf1@xps13>
Date:   Fri, 11 Sep 2020 17:55:14 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-mtd@...ts.infradead.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: remove redundant assignment to pointer eb

Hi Colin,

Colin King <colin.king@...onical.com> wrote on Fri, 11 Sep 2020
11:23:21 +0100:

> From: Colin Ian King <colin.king@...onical.com>
> 
> Pointer eb is being assigned a value that is never read, the assignment
> is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/mtd/mtdswap.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
> index 58eefa43af14..795dec4483c2 100644
> --- a/drivers/mtd/mtdswap.c
> +++ b/drivers/mtd/mtdswap.c
> @@ -1053,7 +1053,6 @@ static int mtdswap_writesect(struct mtd_blktrans_dev *dev,
>  	if (ret < 0)
>  		return ret;
>  
> -	eb = d->eb_data + (newblock / d->pages_per_eblk);
>  	d->page_data[page] = newblock;
>  
>  	return 0;

Yes it looks unused but perhaps it helps to catch the logic here. This
is not a strong disagreement but I'd keep it this way. Let's see what
other maintainers think.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ