From patchwork Wed Mar 8 13:04:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9611025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CD0FB60414 for ; Wed, 8 Mar 2017 13:05:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBBC92807B for ; Wed, 8 Mar 2017 13:05:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E09EF2857F; Wed, 8 Mar 2017 13:05:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B2DD2807B for ; Wed, 8 Mar 2017 13:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752713AbdCHNFP (ORCPT ); Wed, 8 Mar 2017 08:05:15 -0500 Received: from mout.web.de ([212.227.15.14]:52292 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbdCHNFO (ORCPT ); Wed, 8 Mar 2017 08:05:14 -0500 Received: from [192.168.1.2] ([92.228.144.238]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lu1Be-1c5V4D0coo-011VC7; Wed, 08 Mar 2017 14:05:03 +0100 Subject: [PATCH 11/26] IB/ocrdma: Delete unnecessary braces To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Wed, 8 Mar 2017 14:04:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:09ak/TLznElQsOi880oxDLxR75If1Do7b7wXT0luGfRSZ1MKHpv GmmOW2LyzR+BgKWQWJUeVQ9a3BwzX1UiPcVMnFz0WNHyxGeHwY7fp4g1AUOtWEUeNO9hVsc 268WtGBAEX9regd9/HfgAbg61lYXm0534fZsFWYAckyrF1Jf5YXgQk+0MgoUnsWblRHxiin Wr/5+mgIbdnZKRH4adXQQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:iOlaBU/yWUw=:9D5eNIeRo3vJL9hp0kNZxl utlvHPrcIbN0NNPxWYxnQWYrUA3HidW9pp1rs1loV/FasNQ7sN9m4vjeGe0/r4Z4vdZnzAL1i 70b/rmLGph2v+CxHyEVlPs+g+IDossvgdhZW9tQbOr8e8fN9lbi8pOdx1AgG5DhCpeyD3fS1V ATHpAB/P2LBqaJlTiYiAvcBsqKAld7Hdp9i7dlIY9cAU1N+Hq+6vW90fIUpt5rMntq4JxH152 Ea6CbCq2e84oqLjBM7m9AvOiEMtY75rA/119iyvfHr6N/Ju9jVulob+n2rq2phOZYx+AbcHWU qwaReTMHc47vxh0XubE67QvyeguFdqoWuRM/lF/naPp8/n48HKavIdcok5v0MXLh8DOJ5VZNZ NpGu+8K89RVPP+qTjnOx1H+dUzypbjb9axraLf0Atd9TqMyiQ12YcDvmc1wlu5XtkgGpXZG6J Bh6Li7SwHMklNsyuFpRjGklkcVaDVUnPnFfnZYt1h7EJHb7RBnzqGvMoiWuhjMwkY6fW+YAJd ITCVPiLcERy+Z9L55ZKDshRlV6pclX7Kk3Pgb8uuGYjgI4PD1G0mLLwQTX+I8X/3KL25vjtTH sT9RSLfMDaTP7RFfh/bjCHuYxhcfiCbsi0ca5h3VLQJ6kjt8D8NML6TJrQepqMKLdOXPyY52B 40B0zrhVGaNJvb5Xp4K8C+B29zjLsCev+cIcw4eb9HaxZMP7Kr6w7j8LSp7BLtd6M0RkSV2mz 4ECM+JHQhDu2MIPxj3mLZPEPkWCXgxeaQDtd+38DWOiKIc7Z9ad7+ACAMz/o6JM2uwHkrdFhl 0So1dEq Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 7 Mar 2017 21:12:56 +0100 Do not use curly brackets at some source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index aa32bc9f323d..d5b988b011d1 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -1092,14 +1092,14 @@ static int ocrdma_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe) if (cqe_status || ext_status) { pr_err("%s() cqe_status=0x%x, ext_status=0x%x,", __func__, cqe_status, ext_status); - if (rsp) { + if (rsp) /* This is for embedded cmds. */ pr_err("opcode=0x%x, subsystem=0x%x\n", (rsp->subsys_op & OCRDMA_MBX_RSP_OPCODE_MASK) >> OCRDMA_MBX_RSP_OPCODE_SHIFT, (rsp->subsys_op & OCRDMA_MBX_RSP_SUBSYS_MASK) >> OCRDMA_MBX_RSP_SUBSYS_SHIFT); - } + status = ocrdma_get_mbx_cqe_errno(cqe_status); goto mbx_err; } @@ -1600,10 +1600,9 @@ void ocrdma_alloc_pd_pool(struct ocrdma_dev *dev) return; status = ocrdma_mbx_alloc_pd_range(dev); - if (status) { + if (status) pr_err("%s(%d) Unable to initialize PD pool, using default.\n", __func__, dev->id); - } } static void ocrdma_free_pd_pool(struct ocrdma_dev *dev) @@ -2997,11 +2996,10 @@ static int ocrdma_parse_dcbxcfg_rsp(struct ocrdma_dev *dev, int ptype, goto out; } } - if (slindx == OCRDMA_MAX_SERVICE_LEVEL_INDEX) { + if (slindx == OCRDMA_MAX_SERVICE_LEVEL_INDEX) pr_info("%s ocrdma%d application priority not set for 0x%x protocol\n", dev_name(&dev->nic_info.pdev->dev), dev->id, proto); - } } } @@ -3158,16 +3156,17 @@ static int ocrdma_modify_eqd(struct ocrdma_dev *dev, struct ocrdma_eq *eq, int num) { int num_eqs, i = 0; - if (num > 8) { + + if (num > 8) while (num) { num_eqs = min(num, 8); ocrdma_mbx_modify_eqd(dev, &eq[i], num_eqs); i += num_eqs; num -= num_eqs; } - } else { + else ocrdma_mbx_modify_eqd(dev, eq, num); - } + return 0; }