Re: [PATCH 1/2] Staging:iio:Prefer using BIT macro

2016-02-08 Thread Andy Shevchenko
On Mon, Feb 8, 2016 at 11:14 AM, Lars-Peter Clausen wrote: > On 02/08/2016 07:48 AM, Bhumika Goyal wrote: >> value = (s8)((data >> AD7816_TEMP_FLOAT_OFFSET) - 103); >> data &= AD7816_TEMP_FLOAT_MASK; >> if (value < 0) >> - data = (1 <<

Re: [PATCH 1/2] Staging:iio:Prefer using BIT macro

2016-02-08 Thread Lars-Peter Clausen
On 02/08/2016 07:48 AM, Bhumika Goyal wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro. > This was done with coccinelle: > @@ int g; @@ > -(1 << g) > +BIT(g) > > Signed-off-by: Bhumika Goyal Hi, Thanks for the patch. > --- > drivers/staging/iio/adc/ad7816.c | 2 +- > 1 fi

[PATCH 1/2] Staging:iio:Prefer using BIT macro

2016-02-07 Thread Bhumika Goyal
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ int g; @@ -(1 << g) +BIT(g) Signed-off-by: Bhumika Goyal --- drivers/staging/iio/adc/ad7816.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7816.c b/dri