From patchwork Thu Jan 14 17:48:05 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: 8034811 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 614879F3F6 for ; Thu, 14 Jan 2016 17:48:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8664820497 for ; Thu, 14 Jan 2016 17:48:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AACDC2045A for ; Thu, 14 Jan 2016 17:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756263AbcANRsQ (ORCPT ); Thu, 14 Jan 2016 12:48:16 -0500 Received: from mout.web.de ([212.227.15.4]:60155 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754422AbcANRsP (ORCPT ); Thu, 14 Jan 2016 12:48:15 -0500 Received: from [192.168.1.3] ([77.182.186.104]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LZvfZ-1Zu5Ep44iL-00lob4; Thu, 14 Jan 2016 18:48:07 +0100 Subject: [PATCH v3 4/6] InfiniBand-ocrdma: Return a value from a function call in _ocrdma_modify_qp() directly 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: <5697DF55.2050501@users.sourceforge.net> Date: Thu, 14 Jan 2016 18:48:05 +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:FdPDjVe2E3n6nkmqD3em4wuLmBB6bHUiByDivsb3GHW2/RNXhp2 QBdi83cjzHBgfHUyhVM2VWFBdaRu+qfq9AyXZegXImi8FIFKVeAtZI6NWT4VymEdFbgTK1m oyyvNnInKNLD3s8M0RlwMWcmn66NQv1yOzTaI/c8ef+bAiNSkVz2jgPEpigifd6a0tmMgDl AnGiAuetgJHXoqFfXP32g== X-UI-Out-Filterresults: notjunk:1; V01:K0:0pO4a98ySHQ=:coCzdLcCwPR3/oZ999HxOm tTMQk8+VtqeeXRaUxPJ2w7OsHj69AXDgmMFfZx7SSsi5Swnj0Yif1hmzVe3m+RoRM6+Y37q2s 558BnO4CUg6ifvIltKRmVPX6d/JZySVSlE+2vCsEWo2qsI20ZM2Lt6LELkqOglwmuj+fG8xmQ 9kAscwwN23NeJjtcdiXXBQS07mc4vR9+gHvhnfvGO/0qwI+u4CGwRHTHrIlonlbhdviYlci+Q rquAK2PLvXGl43bAw/Y4oQY7dyH3N2zh1MvyYTygXFdFiHeGH1g3GBr3Q57I7lAXu/DTJjP5e Ildd6lovblW27q6RX5FIr+kyupKN16Pas/KRSecc9mYQpiqwzBcG7upNBtXAr6J4a7R1MSULT Cr+AOgIn71nj1vCPCwFs6XsjT7SBEJOuzc0a8xRRCoaLo/7Vkxlhkgo5HG83wVQTrvgZ+iBaG mtZ8qAOd/XF5qRB8eL68vJai4K83qV4nyArorZtU31AqjzSkCgUc2Y10bv0Y59RkMTP4xWdx5 rkECS9YFjXijZfjPreLPooDBQ7s2vKkoBG+oMm58jfx85SYshfFfKw4NGNmKHv8hjdPRB0LNM x2j6/kFlDBXtgzOkveCcT1XTo8ttne6Ceyb45Fq09TntBYIswrUGaglz0xlFdYIM3Y5haKr74 D5pQU/LXeaUGHHDEk/8IaXzhiNgYptj6S2QxkEbc5KZWDyGIdKM01vxnCrBMPIapAzZT2r5JK gARbWU2IMIZsgLxLT3z9/y1hH6neyZS6gE0GBQtK71aopWJW2fXvAnVlJD5yuGxIFelyiwky9 J+TOqDP 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:00:23 +0100 Return the value from a call of the ocrdma_mbx_modify_qp() function without using an extra assignment for the local variable "status". Signed-off-by: Markus Elfring --- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 1d90d18..5f2a34a 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1492,9 +1492,7 @@ int _ocrdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, */ if (status < 0) return status; - status = ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask); - - return status; + return ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask); } int ocrdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,