lkml.org 
[lkml]   [2015]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] comedi: drivers: Fix - BIT macro used coding style issue
On Sun, Nov 01, 2015 at 10:10:59AM -0800, Greg Kroah-Hartman wrote:
> On Sun, Nov 01, 2015 at 12:20:59PM +0200, Andy Shevchenko wrote:
> > On Sun, Nov 1, 2015 at 11:59 AM, Ranjith <ranjithece24@gmail.com> wrote:
> > > BIT macro is used for defining bit location instead of shifting
> > > operator - coding style issue
> >
> > > #define APCI1032_CTRL_INT_OR (0 << 1)
> >
> > > +#define APCI1032_CTRL_INT_AND BIT(1)
> >
> > And now you have two styles at the same time. I wouldn't change the
> > current definitions.
>
> Yes you should, just use BIT(0) for this one.

Oh wait, nevermind, just use the "real" value instead, but using the
BIT() macro is the correct thing, don't tell people not to use it.


\
 
 \ /
  Last update: 2015-11-01 19:41    [W:0.055 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site