X-GM-THRID: 6249681963932712960 X-Received: by 10.194.110.233 with SMTP id id9mr4885409wjb.5.1455118426456; Wed, 10 Feb 2016 07:33:46 -0800 (PST) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 10.25.146.10 with SMTP id u10ls104614lfd.42.gmail; Wed, 10 Feb 2016 07:33:45 -0800 (PST) X-Received: by 10.112.201.104 with SMTP id jz8mr4965419lbc.13.1455118425860; Wed, 10 Feb 2016 07:33:45 -0800 (PST) Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr. [192.134.164.104]) by gmr-mx.google.com with ESMTPS id w128si767851wmd.0.2016.02.10.07.33.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Feb 2016 07:33:45 -0800 (PST) Received-SPF: neutral (google.com: 192.134.164.104 is neither permitted nor denied by domain of julia.lawall@lip6.fr) client-ip=192.134.164.104; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.134.164.104 is neither permitted nor denied by domain of julia.lawall@lip6.fr) smtp.mailfrom=julia.lawall@lip6.fr X-IronPort-AV: E=Sophos;i="5.22,426,1449529200"; d="scan'208";a="164217367" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Feb 2016 16:33:45 +0100 Date: Wed, 10 Feb 2016 16:33:43 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Aybuke Ozdemir cc: outreachy-kernel@googlegroups.com Subject: Re: [Outreachy kernel] [PATCH] Staging: comedi: Prefer using the BIT macro In-Reply-To: <1455117464-17485-1-git-send-email-aybuke.147@gmail.com> Message-ID: References: <1455117464-17485-1-git-send-email-aybuke.147@gmail.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 10 Feb 2016, Aybuke Ozdemir wrote: > From: aybuke This should be your full name. Probably you don't need the From line, since you already have your full name in the from line generated by your mailer. > Replace all instances of bit shifting on 1 with the BIT(x) macro. In > addition, convert other non-1 shift operations with the equivalent > BIT(x) macro for uniformity. Issue pointed out by checkpatch. > > CHECK: Prefer using the BIT macro > > Signed-off-by: aybuke Again, full name needed. > --- > drivers/staging/comedi/comedi.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h > index f0d1b15..9b7d0cb 100644 > --- a/drivers/staging/comedi/comedi.h > +++ b/drivers/staging/comedi/comedi.h > @@ -72,12 +72,12 @@ > #define CR_AREF(a) (((a) >> 24) & 0x03) > > #define CR_FLAGS_MASK 0xfc000000 > -#define CR_ALT_FILTER (1 << 26) > +#define CR_ALT_FILTER BIT(26) > #define CR_DITHER CR_ALT_FILTER > #define CR_DEGLITCH CR_ALT_FILTER > -#define CR_ALT_SOURCE (1 << 27) > -#define CR_EDGE (1 << 30) > -#define CR_INVERT (1 << 31) > +#define CR_ALT_SOURCE BIT(27) > +#define CR_EDGE BIT(30) > +#define CR_INVERT BIT(31) It woud be good to align everything in the same way. julia > > #define AREF_GROUND 0x00 /* analog ref = analog ground */ > #define AREF_COMMON 0x01 /* analog ref = analog common */ > @@ -510,7 +510,7 @@ struct comedi_bufinfo { > #define RANGE_LENGTH(b) ((b) & 0xffff) > > #define RF_UNIT(flags) ((flags) & 0xff) > -#define RF_EXTERNAL (1 << 8) > +#define RF_EXTERNAL BIT(8) > > #define UNIT_volt 0 > #define UNIT_mA 1 > -- > 2.1.4 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1455117464-17485-1-git-send-email-aybuke.147%40gmail.com. > For more options, visit https://groups.google.com/d/optout. >