Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933233AbcKLV45 (ORCPT ); Sat, 12 Nov 2016 16:56:57 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34470 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932346AbcKLV4S (ORCPT ); Sat, 12 Nov 2016 16:56:18 -0500 Subject: Re: [PATCH 10/11] mtd: nand: denali: remove unneeded parentheses To: Masahiro Yamada , linux-mtd@lists.infradead.org References: <1478666130-13413-1-git-send-email-yamada.masahiro@socionext.com> <1478666130-13413-11-git-send-email-yamada.masahiro@socionext.com> Cc: Alan Cox , David Woodhouse , Jason Roberts , Chuanxiao Dong , Dinh Nguyen , linux-kernel@vger.kernel.org, Boris Brezillon , Brian Norris , Richard Weinberger , David Woodhouse , Cyrille Pitchen From: Marek Vasut Message-ID: Date: Sat, 12 Nov 2016 22:41:22 +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-11-git-send-email-yamada.masahiro@socionext.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1813 Lines: 50 On 11/09/2016 05:35 AM, Masahiro Yamada wrote: > Remove parentheses surrounding the whole right side of an assignment. > > Signed-off-by: Masahiro Yamada Reviewed-by: Marek Vasut > --- > > drivers/mtd/nand/denali.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c > index d482d8d..14e66ab 100644 > --- a/drivers/mtd/nand/denali.c > +++ b/drivers/mtd/nand/denali.c > @@ -1510,16 +1510,16 @@ int denali_init(struct denali_nand_info *denali) > * the real pagesize and anything necessery > */ > denali->devnum = ioread32(denali->flash_reg + DEVICES_CONNECTED); > - denali->nand.chipsize <<= (denali->devnum - 1); > - denali->nand.page_shift += (denali->devnum - 1); > + denali->nand.chipsize <<= denali->devnum - 1; > + denali->nand.page_shift += denali->devnum - 1; > denali->nand.pagemask = (denali->nand.chipsize >> > denali->nand.page_shift) - 1; > - denali->nand.bbt_erase_shift += (denali->devnum - 1); > + denali->nand.bbt_erase_shift += denali->devnum - 1; > denali->nand.phys_erase_shift = denali->nand.bbt_erase_shift; > - denali->nand.chip_shift += (denali->devnum - 1); > - mtd->writesize <<= (denali->devnum - 1); > - mtd->oobsize <<= (denali->devnum - 1); > - mtd->erasesize <<= (denali->devnum - 1); > + denali->nand.chip_shift += denali->devnum - 1; > + mtd->writesize <<= denali->devnum - 1; > + mtd->oobsize <<= denali->devnum - 1; > + mtd->erasesize <<= denali->devnum - 1; I won't claim I completely understand what this code does, but it certainly does raise some eyebrows. > mtd->size = denali->nand.numchips * denali->nand.chipsize; > denali->bbtskipbytes *= denali->devnum; > > -- Best regards, Marek Vasut