From patchwork Sat Dec 26 18:50:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 7922271 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66E86BEEE5 for ; Sat, 26 Dec 2015 18:51:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F60E20320 for ; Sat, 26 Dec 2015 18:51:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C65C820306 for ; Sat, 26 Dec 2015 18:51:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbbLZSub (ORCPT ); Sat, 26 Dec 2015 13:50:31 -0500 Received: from mout.web.de ([212.227.15.3]:58778 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbbLZSu3 (ORCPT ); Sat, 26 Dec 2015 13:50:29 -0500 Received: from [192.168.1.2] ([78.53.181.98]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MZDQ4-1Zrwie2Rzg-00KtpF; Sat, 26 Dec 2015 19:50:20 +0100 Subject: [PATCH 5/6] InfiniBand-ocrdma: Returning only value constants in ocrdma_resize_cq() To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <567EE16B.9030808@users.sourceforge.net> Date: Sat, 26 Dec 2015 19:50:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <567EDED5.4040201@users.sourceforge.net> X-Provags-ID: V03:K0:jQtt3b4Jc/bi6tkCjVK5vheKA1z1ne2PW1fK9ryDlFvjDvlTK4L aayy/KhyXZ+s1bAhStkc/BIVedIiJo6Rklie3+EK+tZAag3MKLwLZV5zwe95zFSrBPbVaoS ca92M7MVizNRNcWCwF3ot1ZykrtRx3j/2xCvlDNvp1UVkpY/xWew5LYK1RfChmB8iuGAcf8 FEyNRYR2YzywyORfChpdg== X-UI-Out-Filterresults: notjunk:1; V01:K0:bgVHN70x7MU=:v1PtXo9iaDnHZL9cVP+zRc 1fUVjtCG1dbLwC6aXc5zr3MmhnzglhzyiSCAl+o7dbx+Sc9PS2cXOLeoEqMRHD+Tb964zKAQC /0YmguPhsnTr9YmcPZnXpO3gfcFoKrEQxjMe5Z85Vg6en0yS3ZTEGyGKD+7Z3UZlicCujISCz l7GhPECJAAjiQkkQMTdt13B7dY+FFIq6JVnlo54EOIuHwZupqdmvPLPT+H7ZJtHmFWZLzWECt kVILHhOwTz14Pb/6gsvwJdk/WtgjANb00mJKPPunx9HByo8Jh6uCdyEpUyx5iJ98HZJnRFrQt jjaKnT163fb+DO3kMbpgpThUOKlnJmD7V8h0Org2jDrvZdKP0zPnXu5GmSVsXPIX7omVQhZlm yOl+8orKHw1ZqGc21biYPFItovudIcalWFlb1XcWb2K8PK+iVtRMyMgRX1HG9WjbEQaNQYlJG aSgbehLYoD32Txh8WqOL3Av6YEEx3Kuef7MFsn5PmFXZ7nx5Cy3dYWo/bevT96/I7n1SKJj8L 6vDwMEvQGc+IlzAkHmHTM/AOEbH0invPs8ES3ipIL65WM1ZuLxpoS/rGVYc4gFDF3oLNmGlvW XAVhEH3Xn0CuUsCex1vSs+zpFvcTYJWjvv70X0cr0oKqYpCcDUDYBcZXgBaOiXfa/T1XMu1Nf sD7vaM9Jr81QVfhF9NdJWFftI8NgRiLcO4g8pS9HUetfqRgFsluKold9RZ0vNv8weN3rLDrsF c8VTXP2BG6oeJFKH9ro0EJWRYl5bcBaCjMJTgdv0MrFafvOx+4TfERR0OLxiGgC84SRipqKnt /7Y/+QK Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Markus Elfring Date: Sat, 26 Dec 2015 18:54:47 +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 2de39d3..7bedf44 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1120,15 +1120,12 @@ ctx_err: 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)