Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753591AbdCHN33 (ORCPT ); Wed, 8 Mar 2017 08:29:29 -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 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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 43 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 --- 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, -- 2.12.0