From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759040AbdCVKAr (ORCPT ); Wed, 22 Mar 2017 06:00:47 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:24179 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758962AbdCVKAi (ORCPT ); Wed, 22 Mar 2017 06:00:38 -0400 Date: Wed, 22 Mar 2017 13:00:27 +0300 From: Dan Carpenter To: Arushi Singhal Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rts5208: Replace a bit shift by a use of BIT. Message-ID: <20170322100027.GI32449@mwanda> References: <20170322023447.GA10464@arushi-HP-Pavilion-Notebook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170322023447.GA10464@arushi-HP-Pavilion-Notebook> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 22, 2017 at 08:04:47AM +0530, Arushi Singhal wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ > constant c; > @@ > > -1 << c > +BIT(c) > > Signed-off-by: Arushi Singhal > --- > drivers/staging/rts5208/rtsx_chip.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rts5208/rtsx_chip.c b/drivers/staging/rts5208/rtsx_chip.c > index 3511157a2c78..06a61800b71a 100644 > --- a/drivers/staging/rts5208/rtsx_chip.c > +++ b/drivers/staging/rts5208/rtsx_chip.c > @@ -1490,7 +1490,7 @@ int rtsx_write_register(struct rtsx_chip *chip, u16 addr, u8 mask, u8 data) > > for (i = 0; i < MAX_RW_REG_CNT; i++) { > val = rtsx_readl(chip, RTSX_HAIMR); > - if ((val & (1 << 31)) == 0) { > + if ((val & (BIT(31))) == 0) { Extra parens. Please check all your patches again. regards, dan carpenter