Skip to contentSkip to conversation

comedi: drivers: Fix - BIT macro used coding style issue

PATCH In review [email protected] 2 participants 2 messages Nov 2, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 comedi: drivers: Fix - BIT macro used coding style issue

From: Ranjith <[email protected]>

BIT macro is used for defining bit location instead of shifting operator - coding style issue

---
 drivers/staging/comedi/drivers/addi_apci_1032.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/addi_apci_1032.c +2 -2
index b37166d..fd5ce21 100644
@@ -85,8 +85,8 @@
 #define APCI1032_STATUS_REG		0x0c
 #define APCI1032_CTRL_REG		0x10
 #define APCI1032_CTRL_INT_OR		(0 << 1)
-#define APCI1032_CTRL_INT_AND		(1 << 1)
-#define APCI1032_CTRL_INT_ENA		(1 << 2)
+#define APCI1032_CTRL_INT_AND		BIT(1)
+#define APCI1032_CTRL_INT_ENA		BIT(2)
 
 struct apci1032_private {
 	unsigned long amcc_iobase;	/* base of AMCC I/O registers */
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 16 lines · On 02/11/15 14:25, [email protected] wrote:

From: Ranjith <[email protected]>

BIT macro is used for defining bit location instead of shifting operator - coding style issue

---
  drivers/staging/comedi/drivers/addi_apci_1032.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/addi_apci_1032.c +0 -0
index b37166d..fd5ce21 100644

drivers/staging/comedi/drivers/addi_apci_1032.c line 92

Quoted 10 lines
drivers/staging/comedi/drivers/addi_apci_1032.c +2 -2
@@ -85,8 +85,8 @@
  #define APCI1032_STATUS_REG		0x0c
  #define APCI1032_CTRL_REG		0x10
  #define APCI1032_CTRL_INT_OR		(0 << 1)
-#define APCI1032_CTRL_INT_AND		(1 << 1)
-#define APCI1032_CTRL_INT_ENA		(1 << 2)
+#define APCI1032_CTRL_INT_AND		BIT(1)
+#define APCI1032_CTRL_INT_ENA		BIT(2)
 
  struct apci1032_private {
  	unsigned long amcc_iobase;	/* base of AMCC I/O registers */

Hartley already fixed this coding style issue. It's in linux-next.

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-