From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946078AbcBRNGc (ORCPT ); Thu, 18 Feb 2016 08:06:32 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:7074 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425384AbcBRNGa (ORCPT ); Thu, 18 Feb 2016 08:06:30 -0500 X-IronPort-AV: E=Sophos;i="5.22,465,1449529200"; d="scan'208";a="203649241" Date: Thu, 18 Feb 2016 08:06:13 -0500 (EST) From: Julia Lawall X-X-Sender: jll@hadrien To: Kamal Heib cc: kbuild-all@01.org, Doug Ledford , Amir Vadai , Haggai Eran , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] IB/rxe: fix compare_const_fl.cocci warnings Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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;