From patchwork Sat Dec 26 18:49:11 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: 7922241 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 1A465BEEE5 for ; Sat, 26 Dec 2015 18:49:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4187720320 for ; Sat, 26 Dec 2015 18:49:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CEBD20306 for ; Sat, 26 Dec 2015 18:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352AbbLZStY (ORCPT ); Sat, 26 Dec 2015 13:49:24 -0500 Received: from mout.web.de ([212.227.15.14]:51708 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbbLZStY (ORCPT ); Sat, 26 Dec 2015 13:49:24 -0500 Received: from [192.168.1.2] ([78.53.181.98]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0LiCXL-1aYTGq1jbH-00nPVE; Sat, 26 Dec 2015 19:49:15 +0100 Subject: [PATCH 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> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <567EE127.5080209@users.sourceforge.net> Date: Sat, 26 Dec 2015 19:49:11 +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:P393KtYbT3McfEfGimu96vawK315NBe5vV5K/nJvgQi1a9Vdih8 QL3lFut4wlAYCly+rXtyeKegd+N4IX8pVBD6sMItQHSk9lClj/4m8nHtVCVnKTHXxCFdO95 xz905WWOoiaqSYX7AQMIwp5gqgCkAQljbBdzKyLMdGCAHE5k2AjOTPib41MmOAHYnUzrbCl fsM0Q1+nDJZp2LrXvpXpw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Wyz2jRZSsoM=:bhlui+MmCbOSR4FN3ALFKk +03Y0+kxYpi+oMDze65EDnpYW8zn2wJ3URcY6Ia1fYJ5wbLGsPw7KOKeye+SB1zjJwR17lfYK PNxESR5CML3o1JZt5t263Eu8+2UKOzOCU5QOEMv1XaeDcpeokqGdAxzOmxGdP2sOAH4TSqsso 8V8P+7zNiyqnwj4byEoCamjiuexiJnBHpgWdor2+4u1g0UzYYCF9nWjklBH8tD9vpY3+8L7hB 1OrQh74EwSjtvAsEdjYQLd3m7rLobZnwp+PHo437aXzuxtx2wSxjptlgOxdxA1JqG6UrxHD4g BsMvz8wEkqDUH7DMxwQyszCxi83ePWv4RievRmFBT2G0gXDLG8Gj+xNqSg76MbDTHLmtpyAsh daIdmAHBlTX7pmEDHfPqs4Aa02KdA7Ni3ki4Hst+VVuOjIypiwniOQz3H/bkuyR2KRH2o668m 9RBvGNg39bo1ilxV1bOozOuFDQ4DPm73zVkYXkmAagllrbiGMQ5kaICYvRZfUTNlbtjgraOdo t0izSSAwKs5ejENN8sieJIOdKzyWdffnx3qRo01l9VFx1Zqr+InGLFn7O+aphu3/e6/oCDYkO tSMci8A8OvGNJ536Sgf66ii6ZQx8gk6WE9odXmlEdR6giVHZ00pBBueEfgHqq676AyUhb/9M8 hVbTwkYIiIGUN+SN+XiXV5F5YxZcrHdVNqSPZ9hlRtsVw6Jb7H+2xLCWkS0Z0hzp+XmAm/1TV l822kNwuKMWoBRj+9VJhH5yi4DHFoPGLmQXpXGKPrcANhbKe279zBJ5+ehpXghySM0QfAsW/E meBpozw 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:40:43 +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 aba1b5a..2de39d3 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1491,9 +1491,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,