lkml.org 
[lkml]   [2015]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] staging: rdma: hfi1 : Prefer using the BIT macro
On Thu, Nov 05, 2015 at 05:28:03PM +0530, Sunny Kumar wrote:
> This patch replaces bit shifting on 1 with the BIT(x) macro
>
> Signed-off-by: Sunny Kumar <sunnyk@cdac.in>
> ---
> drivers/staging/rdma/hfi1/user_sdma.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> /* Last packet in the request */
> -#define TXREQ_FLAGS_REQ_LAST_PKT (1 << 0)
> -#define TXREQ_FLAGS_IOVEC_LAST_PKT (1 << 0)
> +#define TXREQ_FLAGS_REQ_LAST_PKT BIT(1 << 0)
> +#define TXREQ_FLAGS_IOVEC_LAST_PKT BIT(1 << 0)
>
It is wrong. It actually creates 0x2 instead of 0x1.

> -#define SDMA_PKT_Q_INACTIVE (1 << 0)
> -#define SDMA_PKT_Q_ACTIVE (1 << 1)
> -#define SDMA_PKT_Q_DEFERRED (1 << 2)
> +#define SDMA_PKT_Q_INACTIVE BIT(1 << 0)
> +#define SDMA_PKT_Q_ACTIVE BIT(1 << 1)
> +#define SDMA_PKT_Q_DEFERRED BIT(1 << 2)
The same comment as above. It is wrong.


\
 
 \ /
  Last update: 2015-11-05 14:41    [W:0.075 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site