From patchwork Sat Sep 21 22:27:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Senna Tschudin X-Patchwork-Id: 2923261 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E6B02BFF05 for ; Sat, 21 Sep 2013 22:33:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E1C2204E7 for ; Sat, 21 Sep 2013 22:33:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D97220439 for ; Sat, 21 Sep 2013 22:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752232Ab3IUW2z (ORCPT ); Sat, 21 Sep 2013 18:28:55 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:54432 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057Ab3IUW2e (ORCPT ); Sat, 21 Sep 2013 18:28:34 -0400 Received: by mail-wg0-f53.google.com with SMTP id x12so1789279wgg.8 for ; Sat, 21 Sep 2013 15:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DVdsP5D8kJU4+LrQrlrySedMVmyySaw0PN15ywourtU=; b=INCaQPlDPyLi5lWNXXfqhOl75YSyD73yn9cH/AZB+X/eUmwb5mTeB9OauFtIsJK13L oNIn7W026HpJdt+67BMpFUKaLBoP/DPbqsez0Qh3ttUVTcxqb8tBWsL07KMpYOXp3C+/ H3+69NkjXpBqezc2ZCVY/kiMVnkE9GNhB26r0wMKUHOAi6bmHjWqxN2sg3BdBMJqiSzY OpXmbJaAGyOA5NBFrBbFTdvxu2Vu8C5eObq0QUYS44JMInyn4bVteDZicsgo9tvalG5v efbGR6jDuF+MbYZ3g4hIc/K8fjvA2JCB7lIn7IXpo9ME3kK2UOWzFHLB5aW7dXj4RmKD /pvg== X-Received: by 10.180.83.101 with SMTP id p5mr7759369wiy.42.1379802513654; Sat, 21 Sep 2013 15:28:33 -0700 (PDT) Received: from notepeter.home (210-232.80-90.static-ip.oleane.fr. [90.80.232.210]) by mx.google.com with ESMTPSA id iz19sm14891990wic.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 21 Sep 2013 15:28:32 -0700 (PDT) From: Peter Senna Tschudin To: roland@kernel.org Cc: sean.hefty@intel.com, hal.rosenstock@gmail.com, bgottumukkala@emulex.com, tj@kernel.org, peter.senna@gmail.com, dan.carpenter@oracle.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 03/19] infiniband: Change variable type to bool Date: Sun, 22 Sep 2013 00:27:35 +0200 Message-Id: <1379802471-30252-3-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1379802471-30252-1-git-send-email-peter.senna@gmail.com> References: <1379802471-30252-1-git-send-email-peter.senna@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The variables found and is_uctx_pd are only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 56e0049..e30e342 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -120,7 +120,7 @@ static bool ocrdma_add_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr, static bool ocrdma_del_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr, bool is_vlan, u16 vlan_id) { - int found = false; + bool found = false; int i; union ib_gid sgid; unsigned long flags; diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 6e982bb..843d18b 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -537,7 +537,7 @@ struct ib_pd *ocrdma_alloc_pd(struct ib_device *ibdev, struct ocrdma_pd *pd; struct ocrdma_ucontext *uctx = NULL; int status; - u8 is_uctx_pd = false; + bool is_uctx_pd = false; if (udata && context) { uctx = get_ocrdma_ucontext(context);