Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755548AbbKXX2s (ORCPT ); Tue, 24 Nov 2015 18:28:48 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56412 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752284AbbKXX2p (ORCPT ); Tue, 24 Nov 2015 18:28:45 -0500 Date: Tue, 24 Nov 2015 15:28:45 -0800 From: Greg KH To: Martyn Welch Cc: Andy Shevchenko , Trivial Patch Monkey , LKML , Manohar Vanga , Egor Uleyskiy Subject: Re: [PATCH] drivers: staging: vme: Changed (1 << n) to BIT(n) Message-ID: <20151124232845.GC17422@kroah.com> References: <1447015193-23606-1-git-send-email-egor.ulieiskii@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2093 Lines: 58 On Mon, Nov 09, 2015 at 08:03:18AM +0000, Martyn Welch wrote: > > On 8 Nov 2015 23:22, "Andy Shevchenko" wrote: > > > > On Sun, Nov 8, 2015 at 10:39 PM, Egor Uleyskiy > wrote: > > > From: Egor Uleyskiy > > > > > > Signed-off-by: Egor Uleyskiy > > > --- > > >? drivers/staging/vme/devices/vme_pio2.h | 93 > ++++++++++++++++------------------ > > >? 1 file changed, 45 insertions(+), 48 deletions(-) > > > > > > diff --git a/drivers/staging/vme/devices/vme_pio2.h b/drivers/staging/vme/ > devices/vme_pio2.h > > > index d5d94c4..29d7a58 100644 > > > --- a/drivers/staging/vme/devices/vme_pio2.h > > > +++ b/drivers/staging/vme/devices/vme_pio2.h > > > > > > @@ -182,7 +181,7 @@ static const int PIO2_CNTR_CTRL[6] = { > PIO2_REGS_CTRL_WRD0, > > >? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PIO2_REGS_CTRL_WRD1 }; > > > > > >? #define PIO2_CNTR_SC_DEV0? ? ? ? ? ? ? 0 > > > -#define PIO2_CNTR_SC_DEV1? ? ? ? ? ? ? (1 << 6) > > > +#define PIO2_CNTR_SC_DEV1? ? ? ? ? ? ? BIT(6) > > >? #define PIO2_CNTR_SC_DEV2? ? ? ? ? ? ? (2 << 6) > > >? #define PIO2_CNTR_SC_RDBACK? ? ? ? ? ? (3 << 6) > > > > With the first parts which are an excellent clean up, this one makes > > two styles out of one. > > Greg, what would you suggest to do? For my opinion in such cases > > direct values or previous syntax looks better. > > > > If BIT() can't be applied uniformly, I'm afraid I don't see the value in using > it. > > Has there been some general push to use BIT(x) rather than (1 << x) that I've > missed? > > I'm not sure how I feel about these macros, is there some advantage that I'm > missing? It's easier to understand for the most part, so yes, it is good to do where it makes sense (hint, not for this last chunk...) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/