Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753500AbdCHN2J (ORCPT ); Wed, 8 Mar 2017 08:28:09 -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 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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 36 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 --- 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) -- 2.12.0