From patchwork Sat Dec 26 18:51:21 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: 7922291 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 D36BD9F387 for ; Sat, 26 Dec 2015 18:51:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1892920320 for ; Sat, 26 Dec 2015 18:51:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3834720306 for ; Sat, 26 Dec 2015 18:51:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbbLZSvh (ORCPT ); Sat, 26 Dec 2015 13:51:37 -0500 Received: from mout.web.de ([212.227.15.14]:60901 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752366AbbLZSvf (ORCPT ); Sat, 26 Dec 2015 13:51:35 -0500 Received: from [192.168.1.2] ([78.53.181.98]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MCZfe-1a3WGb2Gaw-009SuS; Sat, 26 Dec 2015 19:51:27 +0100 Subject: [PATCH 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> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <567EE1A9.9000101@users.sourceforge.net> Date: Sat, 26 Dec 2015 19:51:21 +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:ynsRfsSKKST6uLx6v00N23ViHWcdTkWflPqFC29YS7s3MEactm2 aYkEMwHoIY0nsoMtfRankwjDOvdxqZMTTcIVjVQqW6igOQQ4oKIhLKzaVjFMyVhyp2ZJywk obHyzBFDC5oomVZVhQezK+LBSR5dB0M5oWPJ0VhTlHb5IhzfaNqLfdmSCdcQrE78HGOHwZy ePKwdOCK10uFoa7Sc9yQA== X-UI-Out-Filterresults: notjunk:1; V01:K0:U+ZOwv35ZlE=:/tUjAUYJ3h2ujk/KeJzHLu tFrE32tbN2hrXQDwvM8+zfIet2Mf/tAvSj7XbJCTxvP1ZRavupBksQrbQ3aQb+CvdhiMfNqYS wtSlqlmNB1SWnqylp6qRd7pVcYL8lulWSYiOXi7PNcEGxxwEzgUIB43Dr8WlQoV2iFFYqEYg5 m/HuQVDzKxqIC1+Hz1KPEUXI48snA+kK1DuIGLeQMun1e1f1ShbSM0AeuddEwDYRDrN4T0Zhy MKcO1RTflhUJhDUoxOnIt0Dgoopqfq8bPfuNMInr5Ny70Ytet3pe/GYHiunAt4C9R1NlVZHdG MDJwkBjhy+3rDU9rJ8oi3Kebrt44UhijGEiKvlYPPg03rRSOVz6paCZ+n6PRSKbNe0NYvJUc8 td68eQdjZ14hbEwAjZ/hoCkic99XrJY6BcFr4Fgrgrn9ahl6QOWpRyhiWYf75tMJOOYYed3mk AJ8pybkWmUInjdEBs20Hi9Fy4Ywnh2k2gKsUnGFM7uDIrL5zZ7+Ymc4d4acOTt2h55S9e6IK9 q1FPi5YWT93jOiSRGoYi2UidCX4Pf+raXkE8U/p9GI611PYhZ1ofhr9axJ/a6iJlV+E2oX5ap r8YDLNwBqBM7ipIjwXvEJTXwWwb51Cx7J11c5evcdzAYwKsMqrI34hixTuQi0FJ5g1ifqs8Aj N2G1QqwqNXjhXu1//QoFjJjKUdEsbGirmNLuTqmjLA8YZW6R//DWAzzd+0v2jLXzeRCUml0LV RlpujpKwPvyvphi6JuDxY6nPUyCL5xMkAfE7EJm0AtwueFVsnYJRsPTG+1Zl53Hb8DGwuNwPQ SGjyEKs 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 19:09:23 +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 7bedf44..0f79a01 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -750,7 +750,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; @@ -764,11 +763,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,