From patchwork Thu Jan 14 17:50:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 8034821 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A70B99F1C0 for ; Thu, 14 Jan 2016 17:50:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACA692045A for ; Thu, 14 Jan 2016 17:50:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB4EE20457 for ; Thu, 14 Jan 2016 17:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756016AbcANRuX (ORCPT ); Thu, 14 Jan 2016 12:50:23 -0500 Received: from mout.web.de ([212.227.15.3]:60801 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754194AbcANRuW (ORCPT ); Thu, 14 Jan 2016 12:50:22 -0500 Received: from [192.168.1.3] ([77.182.186.104]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0MABh3-1aUWUB0ncn-00BMSJ; Thu, 14 Jan 2016 18:50:14 +0100 Subject: [PATCH v3 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> <5697D865.5010507@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <5697DFD3.3000705@users.sourceforge.net> Date: Thu, 14 Jan 2016 18:50:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <5697D865.5010507@users.sourceforge.net> X-Provags-ID: V03:K0:x1hOUSzjCvipmoW+uEy+V+zki96zE+ejAM9Z2T5RgJh2q5U/27p H9GFTSxgHKZk6a2tLWTAPkMXkOOkFBH/KCuat1HOWcrfnhfArmdgJnrxpnqWyE7rmbH0R0+ wzbnVPp91vTG+fi8d07ry3ysUt000J9DDrR2Y6Md1+QwZiwrWX8CyPse+GWTDU+M1thKP7I +qdI88WFcKNpHioygcvTw== X-UI-Out-Filterresults: notjunk:1; V01:K0:vRsl7s4yE/g=:zm6uQq1VCduz5aq6nKPHXi 28AeJY8oOnkyAd1u3L9McbkFUelKIp2/oEVxN/AueWRa+ljZWaHesCwY6Sli7TF8qW1Zfo4Fq UdkH2g+2BDEh/iCcSSH1yGxK1TsIs/SzlU81H0gO+O3JRY47rodu3u9wyvJdTAUv0huyj0o6A zwpJDIT62GYjU+jhdYsOPjVT4qZ7PXhtOwH8vzQB8C6lqgFfcpMhCmmB8NXerokb/1hGddKVH a4jaboLo8UaBulUTZuuyMIBS/PlkIZl4YizaeP/aHePtAxbWmH9CW0X3k3DQcUD7jnyYbc2gV /mi/ngqlKh3LNQ7yOtFnS4rSwaW6ZmHAFY/uTiNN7nSM2LD6HrYfb9XXcGTrziVOa2NF3sh4c C0xGyPUUjuhfwWrlAHy5bAJIKB3MfY8Op93tnJ2O24rEa9uLP9rYOxHZjM/d+LQjWNrUhQ6Ao QG+1IT6weo5YVm7qzuEe68KOW6C2eoUV5aERZELsvNbzvkghn9LCNYJPvzPdnRyNECDsCZ2Y0 xh+A8WQDCTIfYFZ2F9jjfNS0HhWztLw/UkqBo1E0iaWgbKQH+1SJUhNrkBkbTuPb0nTrrHZYJ vRlxdYCAZlIMdlVFlkWw4A+LdyAkLusjuCyZOf5AtqEoQpXPh0ssKokH1bCEQxfuorZAM4ypE tO6S4WxKEe7XLco5JoDm0FsO1KoibKHIGuhzS5JgPCAwapxO1I75NDGz/+SG+f6VppML004rn otlTIzZvwBdCrOfo55m0T36shLZQMi+g+KkcUBiYC2BkKqjGDQKjeSnOa7cOOf8D8ysrVbXcy +rCJKuJ 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: Thu, 14 Jan 2016 18:04:17 +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 5f2a34a..d87985b 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1121,15 +1121,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)