From patchwork Wed Mar 8 13:26:16 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: 9611101 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 BEC546046A for ; Wed, 8 Mar 2017 13:28:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97C3A28546 for ; Wed, 8 Mar 2017 13:28:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CA6B28574; Wed, 8 Mar 2017 13:28:38 +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 428D128546 for ; Wed, 8 Mar 2017 13:28:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753476AbdCHN2H (ORCPT ); Wed, 8 Mar 2017 08:28:07 -0500 Received: from mout.web.de ([212.227.15.3]:52009 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753149AbdCHN1W (ORCPT ); Wed, 8 Mar 2017 08:27:22 -0500 Received: from [192.168.1.2] ([92.228.144.238]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LbroC-1cMTWQ0b8W-00jMj5; Wed, 08 Mar 2017 14:26:18 +0100 Subject: [PATCH 22/26] IB/ocrdma: Returning only value constants in ocrdma_resize_cq() 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:26:16 +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:pjMXNfLm6fRxCNH4CEVk44hjVdfAHmOhU/DmLtVJQokJ7uakkf5 2x+i1850XF2J5ZrFZC2pH/hVMu1P2tUZQHlkbRjC8HFNqnMtHXT6JKXoWu+uOQ27BZCuFkY lKIhFWm7/KTpzWMv4PhSU3wERVuWaPvHHJBuDc9rjaMTi9L5oVSwHbnlQ0c5rfAake3e+JD C07dY/X2U01IhrtZMnRbA== X-UI-Out-Filterresults: notjunk:1; V01:K0:MAwIzz10pF8=:wWte9AdGUlMTGBG8KCJTgv adjMVCtyo/5c9K/ysUyDtyOQCa9oPNzUncHE+g0YkvpLd11y6gJIzUm4O0wjuRFMudIMomBvp k76YFThaw6tu2W339DdH4k5QliIzUPcdLPFO3sT9qDugCSCaY9ccBtZeuHf211deefAxNPPKP jPMOs9T81+txcSI8ux/CaHcjHmthZNGimrF+ig4a9jqR2q/kFSjzqGTzon2d1UECb6Gloi69R MNbAVrl7tJ8aAXdwTiG9l4VlZL+oOCYXUJDHn8JwA16NOPQNzewK06qY+zG3tAFN/7bGk8Ank 9oIH0hTK5NoRhT/m6vvcs08n6Rg50q+XtsfjDw9qUpgBV2B3y0SRLzn1vk+C37Lfm8Nis/6U4 YxxOLa+FlZtWopAr+jMDypy9nie/fWeaakipdbhwh4kzEtsI6E6i/XU4qFWzcHXGyG5eWuB8N 2CMUNLfMcicfG1VU2Ur5Isltd530BwScaHwpbhLpnryR8Re4+aLbPMztj0aNUNWeFkqVRXOWP OinEV8j6+Dx3ODP4FhKG2p5lbBobn3MejW5XgEdVxj+ptWSiFz/Tl16PX80jr6NcCoOIwNydu qIuRPDs9gNMVjULfu+lp+f85PyQ71fRDdM3u6Xrc2eQnLNNkBdF3Y6q1kqPkLbtW1x0z94XIi prqg9Ozw5F9qXOMrACDdlnektm/JIx3HI1euT4+wCIOgV0Nws+swGuq7+hVa6fypgWisjckLg UnRA+qvtHdsG2HH23IRI4BDIQjrbvi1pnVqwZjC066Rn8qEU2ox/EPl4ZbIdq+N6A1H/eh4JH NbTMv7C 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: Wed, 8 Mar 2017 10:48:24 +0100 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 bedc229be89d..1d25512416f5 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1123,15 +1123,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)