From patchwork Thu Feb 18 13:06:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 8349521 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2CD1A9F372 for ; Thu, 18 Feb 2016 13:06:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 400DE201C0 for ; Thu, 18 Feb 2016 13:06:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DD2520395 for ; Thu, 18 Feb 2016 13:06:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425535AbcBRNGb (ORCPT ); Thu, 18 Feb 2016 08:06:31 -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" Received: from 68-74-177-106.lightspeed.wepbfl.sbcglobal.net (HELO hadrien) ([68.74.177.106]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Feb 2016 14:06:15 +0100 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 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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;