Re: staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Dan Carpenter
On Wed, Mar 22, 2017 at 08:19:42AM +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/iio/adc/ad7816.c | 2 +- > dri

Re: staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Arnd Bergmann
On Wed, Mar 22, 2017 at 3:49 AM, Arushi Singhal wrote: > @@ -232,7 +232,7 @@ static int ad7150_write_event_config(struct iio_dev > *indio_dev, > if (ret < 0) > goto error_ret; > > - cfg = ret & ~((0x03 << 5) | (0x1 << 7)); > + cfg = ret & ~((0x03 << 5) | (BIT(

Re: staging: iio: Replace a bit shift by a use of BIT.

2017-03-21 Thread Greg Kroah-Hartman
On Wed, Mar 22, 2017 at 08:19:42AM +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/iio/adc/ad7816.c | 2 +- > dri