From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Subject: [PATCH] IB/rxe: fix compare_const_fl.cocci warnings Date: Thu, 18 Feb 2016 08:06:13 -0500 (EST) Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Kamal Heib Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org, Doug Ledford , Amir Vadai , Haggai Eran , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Kamal Heib Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- 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; -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html