Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305481 > unrolled thread

[PATCH] staging: iio: cdc: Prefer using the BIT macro

Started byBhaktipriya Shridhar <bhaktipriya96@gmail.com>
First post2016-01-10 07:30 +0100
Last post2016-01-10 13:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: iio: cdc: Prefer using the BIT macro Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-01-10 07:30 +0100
    Re: [PATCH] staging: iio: cdc: Prefer using the BIT macro Jonathan Cameron <jic23@kernel.org> - 2016-01-10 13:00 +0100

#1305481 — [PATCH] staging: iio: cdc: Prefer using the BIT macro

FromBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Date2016-01-10 07:30 +0100
Subject[PATCH] staging: iio: cdc: Prefer using the BIT macro
Message-ID<qPhFM-sq-5@gated-at.bofh.it>
Replace all occurences of (1<<x) by BIT(x) in the file ad7150.c to get rid
of checkpatch.pl "CHECK" output "Prefer using the BIT macro"

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/staging/iio/cdc/ad7150.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index e8d0ff2..0b934f7 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -21,8 +21,8 @@
  */

 #define AD7150_STATUS              0
-#define AD7150_STATUS_OUT1         (1 << 3)
-#define AD7150_STATUS_OUT2         (1 << 5)
+#define AD7150_STATUS_OUT1         BIT(3)
+#define AD7150_STATUS_OUT2         BIT(5)
 #define AD7150_CH1_DATA_HIGH       1
 #define AD7150_CH2_DATA_HIGH       3
 #define AD7150_CH1_AVG_HIGH        5
@@ -36,7 +36,7 @@
 #define AD7150_CH2_TIMEOUT         13
 #define AD7150_CH2_SETUP           14
 #define AD7150_CFG                 15
-#define AD7150_CFG_FIX             (1 << 7)
+#define AD7150_CFG_FIX             BIT(7)
 #define AD7150_PD_TIMER            16
 #define AD7150_CH1_CAPDAC          17
 #define AD7150_CH2_CAPDAC          18
--
2.1.4

[toc] | [next] | [standalone]


#1305543

FromJonathan Cameron <jic23@kernel.org>
Date2016-01-10 13:00 +0100
Message-ID<qPmP7-3H8-3@gated-at.bofh.it>
In reply to#1305481
On 10/01/16 06:20, Bhaktipriya Shridhar wrote:
> Replace all occurences of (1<<x) by BIT(x) in the file ad7150.c to get rid
> of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Hi,

I'm afraid that a similar patch was sent by Shraddha Barke back at the end
of December.  It just missed the last merge window so can currently only
be found in the testing branch of iio.git.

Thanks anyway. It is always amazing how long code can sit in a given state
before several patches turn up for it in a couple of weeks!

Jonathan
> ---
>  drivers/staging/iio/cdc/ad7150.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
> index e8d0ff2..0b934f7 100644
> --- a/drivers/staging/iio/cdc/ad7150.c
> +++ b/drivers/staging/iio/cdc/ad7150.c
> @@ -21,8 +21,8 @@
>   */
> 
>  #define AD7150_STATUS              0
> -#define AD7150_STATUS_OUT1         (1 << 3)
> -#define AD7150_STATUS_OUT2         (1 << 5)
> +#define AD7150_STATUS_OUT1         BIT(3)
> +#define AD7150_STATUS_OUT2         BIT(5)
>  #define AD7150_CH1_DATA_HIGH       1
>  #define AD7150_CH2_DATA_HIGH       3
>  #define AD7150_CH1_AVG_HIGH        5
> @@ -36,7 +36,7 @@
>  #define AD7150_CH2_TIMEOUT         13
>  #define AD7150_CH2_SETUP           14
>  #define AD7150_CFG                 15
> -#define AD7150_CFG_FIX             (1 << 7)
> +#define AD7150_CFG_FIX             BIT(7)
>  #define AD7150_PD_TIMER            16
>  #define AD7150_CH1_CAPDAC          17
>  #define AD7150_CH2_CAPDAC          18
> --
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web