Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753743AbcKLV6C (ORCPT ); Sat, 12 Nov 2016 16:58:02 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33691 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932640AbcKLV4M (ORCPT ); Sat, 12 Nov 2016 16:56:12 -0500 Subject: Re: [PATCH 06/11] mtd: nand: denali: remove unused struct member totalblks, blksperchip To: Masahiro Yamada , linux-mtd@lists.infradead.org References: <1478666130-13413-1-git-send-email-yamada.masahiro@socionext.com> <1478666130-13413-7-git-send-email-yamada.masahiro@socionext.com> Cc: Boris Brezillon , David Woodhouse , Richard Weinberger , Jason Roberts , linux-kernel@vger.kernel.org, Chuanxiao Dong , Cyrille Pitchen , Brian Norris , David Woodhouse , Dinh Nguyen , Alan Cox From: Marek Vasut Message-ID: <5c9e0f94-1ed5-8681-8829-4f025d5403e0@gmail.com> Date: Sat, 12 Nov 2016 22:35:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <1478666130-13413-7-git-send-email-yamada.masahiro@socionext.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1734 Lines: 53 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 Reviewed-by: Marek Vasut > --- > > 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