lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 Aug 2015 10:42:04 +0200 (CEST)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Joe Perches <joe@...ches.com>
cc:	Julia Lawall <Julia.Lawall@...6.fr>,
	Oleg Drokin <oleg.drokin@...el.com>,
	kernel-janitors@...r.kernel.org,
	Andreas Dilger <andreas.dilger@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	HPDD-discuss@...1.01.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/8] staging: lustre: put constant on the right of binary
 operator



On Sat, 29 Aug 2015, Joe Perches wrote:

> 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));

Thanks for the suggestion.  I'll send a patch, and check for it elsewhere.

julia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ