From patchwork Wed Mar 8 13:28:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9611113 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A96A26046A for ; Wed, 8 Mar 2017 13:30:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73EAD281F9 for ; Wed, 8 Mar 2017 13:30:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68C9228546; Wed, 8 Mar 2017 13:30:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24A37281F9 for ; Wed, 8 Mar 2017 13:30:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753571AbdCHN31 (ORCPT ); Wed, 8 Mar 2017 08:29:27 -0500 Received: from mout.web.de ([212.227.15.4]:56141 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbdCHN3P (ORCPT ); Wed, 8 Mar 2017 08:29:15 -0500 Received: from [192.168.1.2] ([92.228.144.238]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LqXBp-1cHEpm22RF-00e270; Wed, 08 Mar 2017 14:28:11 +0100 Subject: [PATCH 23/26] IB/ocrdma: Delete an unnecessary variable in ocrdma_dealloc_pd() 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: <0e667a69-3afa-6122-ed3b-d313bc5909ad@users.sourceforge.net> Date: Wed, 8 Mar 2017 14:28:10 +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: X-Provags-ID: V03:K0:aGTUY2BS8fwQg2v/fm6S4fy032Fxr0EQgHUFvz1CicaUDWAIlQj bSxXR5Dq5sV+kUKO7loxY5rNV6IiawUnc+f721Q1H9WUzgkDGRvHZ6wGVfOmyadxrSr4ta1 7fZsjLQGTtvinYRT1Go+8KmWMXFIXl/9LvdVvF43N1c7+rrwQnLZ34+2+1ZIgK2YUc5bMcs idPIOJJ2/jN1xeijUtxmw== X-UI-Out-Filterresults: notjunk:1; V01:K0:7Ux8r5HqQdI=:AWGs+BVqMHFUg0LoO4bfms 9GkUufbIFoGIiLjt/rm4NMmfpmekk3si8Gta0hg+IRZb9FzDMfItn6BaPkSqHHewfzr9EwYfF JzogQxpENnbBhdM0QRdFeJjQWgCvqFp6Kl5KcMp4PzffiXpUeNXxOU2lt3uwqzPyA6Zc55MO8 Bn9h4jLiZmx106Lzog6M869fZmEsh6uFw/nR+UmlcvvofDTvSGUX6aRVa6liaobg4U1jdhG4X hw5osWqLsEG2Yr8ij57IKxl8OrlzhtQILAqR0XP2am0DLFTZlvkR1apH4+ghyeBH1pctHH2xy 7K3eVxVN+/s/TGtNOSQLc1E2PhSWCM47ug0jjM9lkQtCyQJVcrc9eYuCAveh4AwdB7R3SHiKp feCuSTVpgMUT8cy9RyJdltJ0OSuDjeKkT9hu6Z1Gf5SdWQsXpvwXWSX6opaz9A6w7ACnVgEjc toZGI5KbEk8wAzhptEsiC2AxTrazA0CePwrtrGlKz+84SLFizksyEZOKFYSC2Fj4lnNlU7Rfa +2RlnYqLt0YrlfiFTpVs6IDwc2IoPpePBiVXqHx/uIgwyKG/IAYrKtnjw9a3kkU6F3a2z0w2I m6PwEUJNgOKQrh+0j35QLTH34DM4hmSBGEkBzEL3WyOxl96lj26oJBv6cMRhlNG2dt+m0MLji d2lS36b+/mQjgMBMOTJ0JwMfF4YWhKqjUkWeAHrunBOJyIkO2iLKg5Ur/CMtRHwBw2n3Fj8Ix 50o27+j9MWnP1DKloBlqhaZbm27uj9YuC1Yd9xdTTETI8jEy90GBnfgerPo/DLEEeNokeHQIQ iccqYM+ Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 8 Mar 2017 10:58:34 +0100 1. Return zero in one case directly. 2. Return the value from a call of the function "_ocrdma_dealloc_pd" without using an extra assignment for the local variable. 3. Remove the variable "status" in this function then. Signed-off-by: Markus Elfring Acked-By: Devesh Sharma Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 1d25512416f5..ae0d343d1731 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -755,7 +755,6 @@ int ocrdma_dealloc_pd(struct ib_pd *ibpd) struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); struct ocrdma_ucontext *uctx = NULL; - int status = 0; u64 usr_db; uctx = pd->uctx; @@ -769,11 +768,10 @@ int ocrdma_dealloc_pd(struct ib_pd *ibpd) if (is_ucontext_pd(uctx, pd)) { ocrdma_release_ucontext_pd(uctx); - return status; + return 0; } } - status = _ocrdma_dealloc_pd(dev, pd); - return status; + return _ocrdma_dealloc_pd(dev, pd); } static int ocrdma_alloc_lkey(struct ocrdma_dev *dev, struct ocrdma_mr *mr,