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


Groups > linux.kernel > #1736370 > unrolled thread

[PATCH] staging:vme Fix use BIT macro

Started byJanani Sankara Babu <jananis37@gmail.com>
First post2017-09-21 08:00 +0200
Last post2017-09-21 13:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging:vme Fix use BIT macro Janani Sankara Babu <jananis37@gmail.com> - 2017-09-21 08:00 +0200
    Re: [PATCH] staging:vme Fix use BIT macro Martyn Welch <martyn@welchs.me.uk> - 2017-09-21 13:50 +0200

#1736370 — [PATCH] staging:vme Fix use BIT macro

FromJanani Sankara Babu <jananis37@gmail.com>
Date2017-09-21 08:00 +0200
Subject[PATCH] staging:vme Fix use BIT macro
Message-ID<us2GJ-59P-3@gated-at.bofh.it>
This patch is created to solve the following warning shown by the checkpatch
script Warning: Replace all occurences of (1<<x) by BIT(x)

Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
 drivers/staging/vme/devices/vme_pio2.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vme/devices/vme_pio2.h b/drivers/staging/vme/devices/vme_pio2.h
index ac4a4ba..e9c3cf6 100644
--- a/drivers/staging/vme/devices/vme_pio2.h
+++ b/drivers/staging/vme/devices/vme_pio2.h
@@ -179,7 +179,7 @@
 					PIO2_REGS_CTRL_WRD1 };
 
 #define PIO2_CNTR_SC_DEV0		0
-#define PIO2_CNTR_SC_DEV1		(1 << 6)
+#define PIO2_CNTR_SC_DEV1		BIT(6)
 #define PIO2_CNTR_SC_DEV2		(2 << 6)
 #define PIO2_CNTR_SC_RDBACK		(3 << 6)
 
@@ -188,12 +188,12 @@
 					PIO2_CNTR_SC_DEV1, PIO2_CNTR_SC_DEV2 };
 
 #define PIO2_CNTR_RW_LATCH		0
-#define PIO2_CNTR_RW_LSB		(1 << 4)
+#define PIO2_CNTR_RW_LSB		BIT(4)
 #define PIO2_CNTR_RW_MSB		(2 << 4)
 #define PIO2_CNTR_RW_BOTH		(3 << 4)
 
 #define PIO2_CNTR_MODE0			0
-#define PIO2_CNTR_MODE1			(1 << 1)
+#define PIO2_CNTR_MODE1			BIT(1)
 #define PIO2_CNTR_MODE2			(2 << 1)
 #define PIO2_CNTR_MODE3			(3 << 1)
 #define PIO2_CNTR_MODE4			(4 << 1)
-- 
1.9.1

[toc] | [next] | [standalone]


#1736589

FromMartyn Welch <martyn@welchs.me.uk>
Date2017-09-21 13:50 +0200
Message-ID<us89r-rR-1@gated-at.bofh.it>
In reply to#1736370
On 21 September 2017 at 06:52, Janani Sankara Babu <jananis37@gmail.com> wrote:
> This patch is created to solve the following warning shown by the checkpatch
> script Warning: Replace all occurences of (1<<x) by BIT(x)
>
> Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
> ---
>  drivers/staging/vme/devices/vme_pio2.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/vme/devices/vme_pio2.h b/drivers/staging/vme/devices/vme_pio2.h
> index ac4a4ba..e9c3cf6 100644
> --- a/drivers/staging/vme/devices/vme_pio2.h
> +++ b/drivers/staging/vme/devices/vme_pio2.h
> @@ -179,7 +179,7 @@
>                                         PIO2_REGS_CTRL_WRD1 };
>
>  #define PIO2_CNTR_SC_DEV0              0
> -#define PIO2_CNTR_SC_DEV1              (1 << 6)
> +#define PIO2_CNTR_SC_DEV1              BIT(6)

Sorry, these changes just don't make sense given the defines below.

>  #define PIO2_CNTR_SC_DEV2              (2 << 6)
>  #define PIO2_CNTR_SC_RDBACK            (3 << 6)
>
> @@ -188,12 +188,12 @@
>                                         PIO2_CNTR_SC_DEV1, PIO2_CNTR_SC_DEV2 };
>
>  #define PIO2_CNTR_RW_LATCH             0
> -#define PIO2_CNTR_RW_LSB               (1 << 4)
> +#define PIO2_CNTR_RW_LSB               BIT(4)
>  #define PIO2_CNTR_RW_MSB               (2 << 4)
>  #define PIO2_CNTR_RW_BOTH              (3 << 4)
>
>  #define PIO2_CNTR_MODE0                        0
> -#define PIO2_CNTR_MODE1                        (1 << 1)
> +#define PIO2_CNTR_MODE1                        BIT(1)
>  #define PIO2_CNTR_MODE2                        (2 << 1)
>  #define PIO2_CNTR_MODE3                        (3 << 1)
>  #define PIO2_CNTR_MODE4                        (4 << 1)
> --
> 1.9.1
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web