lkml.org 
[lkml]   [2015]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] comedi: drivers: Fix - BIT macro used coding style issue
On 02/11/15 14:25, ranjithece24@gmail.com wrote:
> From: Ranjith <ranjithece24@gmail.com>
>
> BIT macro is used for defining BIT location instead of shifting
> operator - coding style issue
>
> Signed-off-by: Ranjith <ranjithece24@gmail.com>
> ---
> drivers/staging/comedi/drivers/addi_apci_1032.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c
> index fd5ce21..168602b 100644
> --- a/drivers/staging/comedi/drivers/addi_apci_1032.c
> +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c
> @@ -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.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-


\
 
 \ /
  Last update: 2015-11-02 16:01    [W:0.033 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site