From patchwork Sat Apr 22 14:50:51 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: 9694431 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 67FF760383 for ; Sat, 22 Apr 2017 14:54:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B95D27EED for ; Sat, 22 Apr 2017 14:54:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E8CA28409; Sat, 22 Apr 2017 14:54:11 +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 D6E7627EED for ; Sat, 22 Apr 2017 14:54:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424693AbdDVOwT (ORCPT ); Sat, 22 Apr 2017 10:52:19 -0400 Received: from mout.web.de ([212.227.15.14]:51491 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424670AbdDVOvI (ORCPT ); Sat, 22 Apr 2017 10:51:08 -0400 Received: from [192.168.1.2] ([77.181.100.232]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MRCoR-1cZVCL2Kg3-00UYeg; Sat, 22 Apr 2017 16:50:54 +0200 Subject: [PATCH v2 10/12] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() From: SF Markus Elfring To: Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier , Yuval Shaia , linux-rdma@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org References: <1492720999.3041.18.camel@redhat.com> <86425035-7da8-d2b1-8544-d4f7540d50c6@users.sourceforge.net> Message-ID: <0ecccc12-7340-927b-3745-8b84a7e137f8@users.sourceforge.net> Date: Sat, 22 Apr 2017 16:50:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <86425035-7da8-d2b1-8544-d4f7540d50c6@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:9HdvJbVQL3g8XJ1fnthEUY9xoEnc+aq09RR4u217djF7koXM3Xv ktmB3hCJySroK8gHPay2AUFLNWgG9YME3vUhp92F70VEGrLGK0S4dBNdkvUxJEythZH2q8A v8jfZevBvqzVQw0LRQRhWu2wtIdZa4WuMzGi5DcEhB4Al+LPEGPPXOFH6NVqlz8D0t0as8R M6II2epdmUKS1cPwq67bA== X-UI-Out-Filterresults: notjunk:1; V01:K0:29oHwyjn0V4=:Eh4DNvqboZVgzQhkc+X+Yo xfmzun2y0vCFLstIlCVYXLgbu23LXG6YcrrT1I4YreZq0q7MjI0UzjqSz4WVljIMH4biJJfVB pK1qNzDLbPtA1D9vCxJKlEmKBHT3sgAqcd1YIx405rwutLKh1fadJKfpPrCvbMMx4vV40N6/O ajRMjMLVCC6DvCYbA+7HdP+cIQZ+XGXV/78Sztwg67oDYyqvDIaPJ7/Madx3fxeoAAEcq4gNt BYkdwvUkXr/lZGxqGhBUB9kCeN144egf2dNXGM56PmW2YDqdPbap3dl2POP6TaYZZTDQhd17y 7hnTN/gaUakkEOH/XqxRE8Cm3u9fHphQrjmyobM/+7/s2RHjQV+OPpDSDN6H2Z4HBpw2RjeS4 MMHuQJLsWBJnm4o/XSLDYTFNBkGipX96GwZH5SweuDRecj7bltU0M7np0Wr639YGQNYScqnrB yMnCrd4XmkZv04gnGVr1oxwsnVeE3cDzEJvqhcI2RXm5UwlgGqFM6Nw8m8WL4GUgKKkltIPSU f7gcVjHs+6FhqFBPaAD1muvT5e+lJv2kSTnHe6f1KMLgPT91XZ3kBQbLsLgQFbDAMhefOfrOt fx036h5I/51KsALOqWHjyXfb1yaTBNMXh649fvQDVyI+dK7cuYhQLaOH9T3VJdyq87gDk0aA+ rMZscYSYKBZ6cgT+ptCkq5ulpRC5GJeglkSuwkWd94N/D3cQABrkLV+lYnNn2LJBiwTEa8DJ/ 9EbjwETwLYlFsiGJgxpMtBBQeX7d48ENrmzEzuSaRN01cbAFgLesqPA3CQs376E+Hsg4wdTaq GZkwhgP 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: Sat, 22 Apr 2017 15:15:09 +0200 Return constant integer values without storing them in the local variable "status". Signed-off-by: Markus Elfring Acked-by: Devesh Sharma Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 2dc399eeeefd..60b8813aff42 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1122,15 +1122,12 @@ struct ib_cq *ocrdma_create_cq(struct ib_device *ibdev, int ocrdma_resize_cq(struct ib_cq *ibcq, int new_cnt, struct ib_udata *udata) { - int status = 0; struct ocrdma_cq *cq = get_ocrdma_cq(ibcq); - if (new_cnt < 1 || new_cnt > cq->max_hw_cqe) { - status = -EINVAL; - return status; - } + if (new_cnt < 1 || new_cnt > cq->max_hw_cqe) + return -EINVAL; ibcq->cqe = new_cnt; - return status; + return 0; } static void ocrdma_flush_cq(struct ocrdma_cq *cq)