From: Julia Lawall <julia.lawall@lip6.fr>
To: Kamal Heib <kamalh@mellanox.com>
Cc: kbuild-all@01.org, Doug Ledford <dledford@redhat.com>,
Amir Vadai <amirv@mellanox.com>,
Haggai Eran <haggaie@mellanox.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] IB/rxe: fix compare_const_fl.cocci warnings
Date: Thu, 18 Feb 2016 08:06:13 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.10.1602180803370.2671@hadrien> (raw)
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
CC: Kamal Heib <kamalh@mellanox.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.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;
next reply other threads:[~2016-02-18 13:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 13:06 Julia Lawall [this message]
2016-02-18 16:56 ` [PATCH] IB/rxe: fix compare_const_fl.cocci warnings Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1602180803370.2671@hadrien \
--to=julia.lawall@lip6.fr \
--cc=amirv@mellanox.com \
--cc=devel@driverdev.osuosl.org \
--cc=dledford@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=haggaie@mellanox.com \
--cc=hal.rosenstock@gmail.com \
--cc=kamalh@mellanox.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox