Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-23 Thread Dan Carpenter
On Wed, Mar 22, 2017 at 10:12:34PM +0530, Arushi Singhal wrote: > /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) > */ > -#define AD7746_CAPSETUP_CAPEN(1 << 7) > -#define AD7746_CAPSETUP_CIN2 (1 << 6) /* AD7746 only */ > -#define

Re: [Outreachy kernel] [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Julia Lawall
On Wed, 22 Mar 2017, 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 > --- > changes in v2 > -remove/correct

Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Jonathan Cameron
On 22/03/17 16:42, 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 Applied to the togreg branch of iio.git and

[PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Arushi Singhal
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 --- changes in v2 -remove/correct the wrong code. drivers/staging/iio/cdc/ad7150.c | 2 +-

Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Lars-Peter Clausen
On 03/22/2017 09:38 AM, 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) When it comes to doing this type of conversion semantics, i.e. the meaning of the value, are important. The

[PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

2017-03-22 Thread Arushi Singhal
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 --- changes in v2 -change the cc list drivers/staging/iio/adc/ad7816.c | 2 +-