lkml.org 
[lkml]   [2015]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 8/8] staging: lustre: put constant on the right of binary operator
From
Date
On Sat, 2015-08-29 at 19:30 +0200, Julia Lawall wrote:
> Move constants to the right of binary operators.
[]
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
[]
> @@ -2954,7 +2954,7 @@ void ptlrpc_init_xid(void)
> }
>
> /* Always need to be aligned to a power-of-two for multi-bulk BRW */
> - CLASSERT((PTLRPC_BULK_OPS_COUNT & (PTLRPC_BULK_OPS_COUNT - 1)) == 0);
> + CLASSERT(((PTLRPC_BULK_OPS_COUNT - 1) & PTLRPC_BULK_OPS_COUNT) == 0);

This one would probably be better as

CLASSERT(is_power_of_2(PTLRPC_BULK_OPS_COUNT));





\
 
 \ /
  Last update: 2015-08-30 02:21    [W:0.175 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site