comedi: drivers: Fix - BIT macro used coding style issue
A message that is not in the archive (sent off-list or not yet received): 1446474307-6521-1-git-send-email-yes
PATCH 2/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
Signed-off-by Ranjith <[email protected]>
--- drivers/staging/comedi/drivers/addi_apci_1032.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/addi_apci_1032.c +1 -1
@@ -84,7 +84,7 @@#define APCI1032_MODE2_REG 0x08#define APCI1032_STATUS_REG 0x0c#define APCI1032_CTRL_REG 0x10 -#define APCI1032_CTRL_INT_OR (0 << 1) +#define APCI1032_CTRL_INT_OR BIT(0)#define APCI1032_CTRL_INT_AND BIT(1)#define APCI1032_CTRL_INT_ENA BIT(2)
Signature · 1 line
1.7.10.4
Quoted 15 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
Signed-off-by Ranjith <[email protected]>--- drivers/staging/comedi/drivers/addi_apci_1032.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/comedi/drivers/addi_apci_1032.c +0
-0
drivers/staging/comedi/drivers/addi_apci_1032.c line 89
Quoted 7 lines
drivers/staging/comedi/drivers/addi_apci_1032.c +1
-1@@ -84,7 +84,7 @@#define APCI1032_MODE2_REG 0x08#define APCI1032_STATUS_REG 0x0c#define APCI1032_CTRL_REG 0x10 -#define APCI1032_CTRL_INT_OR (0 << 1) +#define APCI1032_CTRL_INT_OR BIT(0)#define APCI1032_CTRL_INT_AND BIT(1)#define APCI1032_CTRL_INT_ENA BIT(2)
No, that's wrong. (0 << 1) is 0, but BIT(0) is 1.
Hartley already fixed the 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/ )=-