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: <5c9e0f94-1ed5-8681-8829-4f025d5403e0@gmail.com>
Date:   Sat, 12 Nov 2016 22:35:50 +0100
From:   Marek Vasut <marek.vasut@...il.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-mtd@...ts.infradead.org
Cc:     Boris Brezillon <boris.brezillon@...e-electrons.com>,
        David Woodhouse <David.Woodhouse@...el.com>,
        Richard Weinberger <richard@....at>,
        Jason Roberts <jason.e.roberts@...el.com>,
        linux-kernel@...r.kernel.org,
        Chuanxiao Dong <chuanxiao.dong@...el.com>,
        Cyrille Pitchen <cyrille.pitchen@...el.com>,
        Brian Norris <computersforpeace@...il.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Dinh Nguyen <dinguyen@...era.com>,
        Alan Cox <alan@...ux.intel.com>
Subject: Re: [PATCH 06/11] mtd: nand: denali: remove unused struct member
 totalblks, blksperchip

On 11/09/2016 05:35 AM, Masahiro Yamada wrote:
> The denali->blksperchip is set, but not referenced any more.  The
> denali->totalblks is used only for calculating denali->blksperchip.
> Both of them are unneeded.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>

Reviewed-by: Marek Vasut <marek.vasut@...il.com>

> ---
> 
>  drivers/mtd/nand/denali.c | 8 --------
>  drivers/mtd/nand/denali.h | 2 --
>  2 files changed, 10 deletions(-)
> 
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index 78d795b..548278b 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -1573,14 +1573,6 @@ int denali_init(struct denali_nand_info *denali)
>  	denali->nand.ecc.bytes *= denali->devnum;
>  	denali->nand.ecc.strength *= denali->devnum;
>  
> -	/*
> -	 * Let driver know the total blocks number and how many blocks
> -	 * contained by each nand chip. blksperchip will help driver to
> -	 * know how many blocks is taken by FW.
> -	 */
> -	denali->totalblks = mtd->size >> denali->nand.phys_erase_shift;
> -	denali->blksperchip = denali->totalblks / denali->nand.numchips;
> -
>  	/* override the default read operations */
>  	denali->nand.ecc.size = ECC_SECTOR_SIZE * denali->devnum;
>  	denali->nand.ecc.read_page = denali_read_page;
> diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h
> index 7c0800d..ea22191 100644
> --- a/drivers/mtd/nand/denali.h
> +++ b/drivers/mtd/nand/denali.h
> @@ -462,8 +462,6 @@ struct denali_nand_info {
>  	int irq;
>  
>  	uint32_t devnum;	/* represent how many nands connected */
> -	uint32_t totalblks;
> -	uint32_t blksperchip;
>  	uint32_t bbtskipbytes;
>  	uint32_t max_banks;
>  };
> 


-- 
Best regards,
Marek Vasut

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ