lkml.org 
[lkml]   [2013]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 03/32 v2] dmaengine: ste_dma40: Use the BIT macro to replace ugly '(1 << x)'s
From
On Thu, Apr 18, 2013 at 2:16 PM, Lee Jones <lee.jones@linaro.org> wrote:

> The aim is to make the code that little more readable.
>
> Cc: Vinod Koul <vinod.koul@intel.com>
> Cc: Dan Williams <djbw@fb.com>
> Cc: Per Forlin <per.forlin@stericsson.com>
> Cc: Rabin Vincent <rabin@rab.in>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 3b83dee..ddf5ff1 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -49,9 +49,9 @@
> #define MAX_LCLA_ALLOC_ATTEMPTS 256
>
> /* Bit markings for allocation map */
> -#define D40_ALLOC_FREE (1 << 31)
> -#define D40_ALLOC_PHY (1 << 30)
> -#define D40_ALLOC_LOG_FREE 0
> +#define D40_ALLOC_FREE BIT(31)
> +#define D40_ALLOC_PHY BIT(30)
> +#define D40_ALLOC_LOG_FREE BIT(0)

No. 0 != BIT(0)

Please fix this...

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-04-24 17:42    [W:0.177 / U:1.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site