lkml.org 
[lkml]   [2019]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] iio:adc:ad7923: Use BIT macro instead of bitshift
On Fri, 22 Feb 2019 17:31:57 -0300
Bárbara Fernandes <barbara.fernandes@usp.br> wrote:

> Replace use of the operation '<<' by the BIT macro. Solves checkpath.pl's
> message:
>
> CHECK: Prefer using the BIT macro
>
> Signed-off-by: Bárbara Fernandes <barbara.fernandes@usp.br>
Applied. Thanks,

Jonathan

> ---
> drivers/iio/adc/ad7923.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/ad7923.c b/drivers/iio/adc/ad7923.c
> index ebae7522710a..b39ea834cdd6 100644
> --- a/drivers/iio/adc/ad7923.c
> +++ b/drivers/iio/adc/ad7923.c
> @@ -24,9 +24,9 @@
> #include <linux/iio/trigger_consumer.h>
> #include <linux/iio/triggered_buffer.h>
>
> -#define AD7923_WRITE_CR (1 << 11) /* write control register */
> -#define AD7923_RANGE (1 << 1) /* range to REFin */
> -#define AD7923_CODING (1 << 0) /* coding is straight binary */
> +#define AD7923_WRITE_CR BIT(11) /* write control register */
> +#define AD7923_RANGE BIT(1) /* range to REFin */
> +#define AD7923_CODING BIT(0) /* coding is straight binary */
> #define AD7923_PM_MODE_AS (1) /* auto shutdown */
> #define AD7923_PM_MODE_FS (2) /* full shutdown */
> #define AD7923_PM_MODE_OPS (3) /* normal operation */

\
 
 \ /
  Last update: 2019-03-03 15:46    [W:0.058 / U:0.192 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site