From patchwork Thu Jan 9 22:48:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3463661 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 44CFEC02DC for ; Thu, 9 Jan 2014 22:48:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6156F200F3 for ; Thu, 9 Jan 2014 22:48:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7320120103 for ; Thu, 9 Jan 2014 22:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756206AbaAIWsm (ORCPT ); Thu, 9 Jan 2014 17:48:42 -0500 Received: from mtv-iport-2.cisco.com ([173.36.130.13]:20973 "EHLO mtv-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756734AbaAIWsi (ORCPT ); Thu, 9 Jan 2014 17:48:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5427; q=dns/txt; s=iport; t=1389307718; x=1390517318; h=from:to:cc:subject:date:message-id; bh=45QdgkxO7Q7LlMm1xW4JNLgthAr8CMl6UrG9+TXfUGg=; b=YZzw5Bg2f0XgemULRkpTZxmZDKegsoGGzIdWl7/jDfktejb9Jg7dzfrU 62Q6qLdusOcTVK/GCxR1DPcdi6dW4KOUnx0lU0vWzg95nH3Igcec6LDXn La121VPwyc74qwunJD6HDDJTFNE8sy6ElVQEPjDE4LzjRaHINJWufOlsl A=; X-IronPort-AV: E=Sophos;i="4.95,634,1384300800"; d="scan'208";a="102511300" Received: from mtv-core-1.cisco.com ([171.68.58.6]) by mtv-iport-2.cisco.com with ESMTP; 09 Jan 2014 22:48:38 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id s09MmbHu030934; Thu, 9 Jan 2014 22:48:37 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id 9C4BB3F563; Thu, 9 Jan 2014 14:48:37 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org, roland@kernel.org Cc: Upinder Malhi Subject: [PATCH for-next] IB/usnic: Remove superflous parentheses Date: Thu, 9 Jan 2014 14:48:36 -0800 Message-Id: <1389307716-11627-1-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 Depends on "[PATCH v1 for-next] IB/usnic: usNIC UDP Support" series. Remove superflous parentheses from one line ifs. Signed-off-by: Upinder Malhi --- drivers/infiniband/hw/usnic/usnic_ib_main.c | 6 +++--- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 18 +++++++++--------- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) -- 1.8.1 -- 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 diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c index 3b7e8bd..f7be445 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_main.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c @@ -470,7 +470,7 @@ static struct usnic_ib_dev *usnic_ib_discover_pf(struct usnic_vnic *vnic) us_ibdev = usnic_ib_device_add(parent_pci); if (IS_ERR_OR_NULL(us_ibdev)) { - us_ibdev = (us_ibdev) ? us_ibdev : ERR_PTR(-EFAULT); + us_ibdev = us_ibdev ? us_ibdev : ERR_PTR(-EFAULT); goto out; } @@ -526,7 +526,7 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev, vf->vnic = usnic_vnic_alloc(pdev); if (IS_ERR_OR_NULL(vf->vnic)) { - err = (vf->vnic ? PTR_ERR(vf->vnic) : -ENOMEM); + err = vf->vnic ? PTR_ERR(vf->vnic) : -ENOMEM; usnic_err("Failed to alloc vnic for %s with err %d\n", pci_name(pdev), err); goto out_release_regions; @@ -536,7 +536,7 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev, if (IS_ERR_OR_NULL(pf)) { usnic_err("Failed to discover pf of vnic %s with err%ld\n", pci_name(pdev), PTR_ERR(pf)); - err = (pf ? PTR_ERR(pf) : -EFAULT); + err = pf ? PTR_ERR(pf) : -EFAULT; goto out_clean_vnic; } diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c index 7967c8b..7ecc606 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c @@ -215,14 +215,14 @@ create_roce_custom_flow(struct usnic_ib_qp_grp *qp_grp, if (IS_ERR_OR_NULL(flow)) { usnic_err("Unable to alloc flow failed with err %ld\n", PTR_ERR(flow)); - err = (flow) ? PTR_ERR(flow) : -EFAULT; + err = flow ? PTR_ERR(flow) : -EFAULT; goto out_unreserve_port; } /* Create Flow Handle */ qp_flow = kzalloc(sizeof(*qp_flow), GFP_ATOMIC); if (IS_ERR_OR_NULL(qp_flow)) { - err = (qp_flow) ? PTR_ERR(qp_flow) : -ENOMEM; + err = qp_flow ? PTR_ERR(qp_flow) : -ENOMEM; goto out_dealloc_flow; } qp_flow->flow = flow; @@ -290,14 +290,14 @@ create_udp_flow(struct usnic_ib_qp_grp *qp_grp, if (IS_ERR_OR_NULL(flow)) { usnic_err("Unable to alloc flow failed with err %ld\n", PTR_ERR(flow)); - err = (flow) ? PTR_ERR(flow) : -EFAULT; + err = flow ? PTR_ERR(flow) : -EFAULT; goto out_put_sock; } /* Create qp_flow */ qp_flow = kzalloc(sizeof(*qp_flow), GFP_ATOMIC); if (IS_ERR_OR_NULL(qp_flow)) { - err = (qp_flow) ? PTR_ERR(qp_flow) : -ENOMEM; + err = qp_flow ? PTR_ERR(qp_flow) : -ENOMEM; goto out_dealloc_flow; } qp_flow->flow = flow; @@ -419,7 +419,7 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp, qp_flow = create_and_add_flow(qp_grp, trans_spec); if (IS_ERR_OR_NULL(qp_flow)) { - status = (qp_flow) ? PTR_ERR(qp_flow) : -EFAULT; + status = qp_flow ? PTR_ERR(qp_flow) : -EFAULT; break; } } else { @@ -434,7 +434,7 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp, qp_flow = create_and_add_flow(qp_grp, trans_spec); if (IS_ERR_OR_NULL(qp_flow)) { - status = (qp_flow) ? PTR_ERR(qp_flow) : -EFAULT; + status = qp_flow ? PTR_ERR(qp_flow) : -EFAULT; break; } } else { @@ -547,8 +547,8 @@ alloc_res_chunk_list(struct usnic_vnic *vnic, res_chunk_list[i] = usnic_vnic_get_resources(vnic, res_type, res_cnt, owner_obj); if (IS_ERR_OR_NULL(res_chunk_list[i])) { - err = (res_chunk_list[i] ? - PTR_ERR(res_chunk_list[i]) : -ENOMEM); + err = res_chunk_list[i] ? + PTR_ERR(res_chunk_list[i]) : -ENOMEM; usnic_err("Failed to get %s from %s with err %d\n", usnic_vnic_res_type_to_str(res_type), usnic_vnic_pci_name(vnic), @@ -701,7 +701,7 @@ usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, struct usnic_ib_vf *vf, if (IS_ERR_OR_NULL(qp_flow)) { usnic_err("Unable to create and add flow with err %ld\n", PTR_ERR(qp_flow)); - err = (qp_flow) ? PTR_ERR(qp_flow) : -EFAULT; + err = qp_flow ? PTR_ERR(qp_flow) : -EFAULT; goto out_qp_grp_vf_unbind; } diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c index 937113f..d48d2c0 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c @@ -495,7 +495,7 @@ struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd, &trans_spec, &res_spec); if (IS_ERR_OR_NULL(qp_grp)) { - err = (qp_grp ? PTR_ERR(qp_grp) : -ENOMEM); + err = qp_grp ? PTR_ERR(qp_grp) : -ENOMEM; goto out_release_mutex; } @@ -605,7 +605,7 @@ struct ib_mr *usnic_ib_reg_mr(struct ib_pd *pd, u64 start, u64 length, mr->umem = usnic_uiom_reg_get(to_upd(pd)->umem_pd, start, length, access_flags, 0); if (IS_ERR_OR_NULL(mr->umem)) { - err = (mr->umem) ? PTR_ERR(mr->umem) : -EFAULT; + err = mr->umem ? PTR_ERR(mr->umem) : -EFAULT; goto err_free; }