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] [day] [month] [year] [list]
Message-ID: <56C5F7DB.1070009@redhat.com>
Date:	Thu, 18 Feb 2016 11:56:59 -0500
From:	Doug Ledford <dledford@...hat.com>
To:	Julia Lawall <julia.lawall@...6.fr>,
	Kamal Heib <kamalh@...lanox.com>
Cc:	kbuild-all@...org, Amir Vadai <amirv@...lanox.com>,
	Haggai Eran <haggaie@...lanox.com>,
	Sean Hefty <sean.hefty@...el.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-rdma@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] IB/rxe: fix compare_const_fl.cocci warnings

On 2/18/2016 8:06 AM, Julia Lawall wrote:
> Move constants to the right of binary operators.
> 
> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> 
> CC: Kamal Heib <kamalh@...lanox.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
> ---
> 
> The constants on the right look a bit nicer.  Another possibility would be
> !!.
> 
> tree:   https://github.com/dledford/linux.git rxe-v2
> head:   bc91f3e63df667e8da8894a51149a2fc9acf0e71
> commit: 30e5584cf453cd90bbcd3ebb5f3e774c0195dd83 [30/31] IB/rxe: Add
> Soft-RoCE to kbuild and makefiles
> 
>  rxe_mr.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/staging/rdma/rxe/rxe_mr.c
> +++ b/drivers/staging/rdma/rxe/rxe_mr.c
> @@ -43,8 +43,8 @@ static u8 rxe_get_key(void)
> 
>  	key = key << 1;
> 
> -	key |= (0 != (key & 0x100)) ^ (0 != (key & 0x10))
> -		^ (0 != (key & 0x80)) ^ (0 != (key & 0x40));
> +	key |= ((key & 0x100) != 0) ^ ((key & 0x10) != 0)
> +		^ ((key & 0x80) != 0) ^ ((key & 0x40) != 0);
> 
>  	key &= 0xff;
> 

Thanks, applied to my rxe-v2 branch.


Download attachment "signature.asc" of type "application/pgp-signature" (885 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ