Skip to contentSkip to conversation

staging:vme Fix use BIT macro

PATCH In review Janani Sankara Babu 2 participants 2 messages Sep 21, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:vme Fix use BIT macro

This patch is created to solve the following warning shown by the checkpatch script Warning: Replace all occurences of (1<<x) by BIT(x)

---
 drivers/staging/vme/devices/vme_pio2.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vme/devices/vme_pio2.h +3 -3
index ac4a4ba..e9c3cf6 100644
@@ -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)
Signature · 1 line
1.9.1
#1 lore raw
Quoted 13 lines · Janani Sankara Babu

This patch is created to solve the following warning shown by the checkpatch script Warning: Replace all occurences of (1<<x) by BIT(x)

---
 drivers/staging/vme/devices/vme_pio2.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vme/devices/vme_pio2.h +0 -0
index ac4a4ba..e9c3cf6 100644

drivers/staging/vme/devices/vme_pio2.h line 182

Quoted 5 lines
drivers/staging/vme/devices/vme_pio2.h +1 -1
@@ -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.

Quoted 21 lines
drivers/staging/vme/devices/vme_pio2.h +2 -3
 #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