From patchwork Thu Jan 14 17:51:35 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: 8034851 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 19C109F1C0 for ; Thu, 14 Jan 2016 17:52:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D2DE20497 for ; Thu, 14 Jan 2016 17:52:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F7D720457 for ; Thu, 14 Jan 2016 17:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756263AbcANRvt (ORCPT ); Thu, 14 Jan 2016 12:51:49 -0500 Received: from mout.web.de ([212.227.15.14]:64616 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755961AbcANRvr (ORCPT ); Thu, 14 Jan 2016 12:51:47 -0500 Received: from [192.168.1.3] ([77.182.186.104]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0La1Sn-1Zu2k91Nt7-00lnuN; Thu, 14 Jan 2016 18:51:36 +0100 Subject: [PATCH v3 6/6] InfiniBand-ocrdma: Delete an unnecessary variable in ocrdma_dealloc_pd() 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: <5697E027.30603@users.sourceforge.net> Date: Thu, 14 Jan 2016 18:51:35 +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:biz1ZR0h8vobCM6E3fhtLP5ElO2Emobrtvr41gdojS41LbY3NwZ K8ghDZE/lJsttLXJpwWMgdx8w2/AUbMGr2B5DLQ9mtxMO1TFa1q1Vl3/KVpvzl/wyDuVQ5z bF7kDHiN8UlwvwTG346+HFMYBHMCgdAdzmSxQgpj/6YvDXgf6BuT5zivrKgSxsjFjZ+m1/k MrkR4tcpsf7tieEfDMHaQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:1pPu5nT8lhc=:1suTavo9OTvb5XLBmCa9cj tsyaSCuuQfuT9OpzY/WRcbDWReVsyISg3Z0mQksV3rgLAo+aQde4OFeoG74VMWSS94gtApRtl EnbXz8Nnula2QxjIp6YjkjKrTl53BkHid3ongjJ7ef2LlPXJhpWSquJGVsnRp1klXtS3DNJoo lWpDrEnT+akv/39RJOOPeLDinvv1P3ZnEVEq+bugXycE96IN3VP3UYoEizKAip+b0oZ7Irrlc B5htbwQMKJv3KgsTRScwukK4rdD7mDc4H50WVziWMUWDcBLOCiPYd4gzUPbGXHEuw+Kld4tmf I0VsRWdvVkpgrEfty6z+3TqYmCgQ3oOhRWxOw189rR1ZwGOhUixrcSEhhb8I6HxNK84QmnHax jwirOGzUl2h5VVuB8XxIiNSydKQh+JeYa0jkSCdQGQCsXxvJDJkFIjaTAyTilyxbRk2BFOzqO guJpsxRkdCNkzzSqPaU1fA2cF7KxfO/0GnrWW0d2iKVfLu5FODY083CmWn4EAVufzzBJ2eWSa /0mRcFI1HlEU05RGpEuNqsKxRJWKcu4iyqSNsdUlpMFUxuJoS8We+8aYWdtNJ/pMQ95iHy02u evaqeVl6s1r50oyX7jKdDN/0GAsVkPzLuFQvzAMchQsT8bepFWwXb1yTtxeHH6HmBVkcEKX5f GBhCYXc/k+G7WWdBzB+67NgJi5Bccwc4wb2jsJ+QeDlaghwS7CxvKW51Plc4Cy0dFebR61YBq 33rig5qlcQREWNI23Ux3FZsvqyuzZIpiVhw2jR/2LQ/1uuiL7iyna+No8IAmMDD8uCxepS8mt id9uXWz 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:08:08 +0100 1. Return zero in one case directly. 2. Return the value from a call of the _ocrdma_dealloc_pd() function 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 d87985b..e6e1b51 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -751,7 +751,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; @@ -765,11 +764,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,