From patchwork Mon Feb 18 09:19:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 10817517 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0597E922 for ; Mon, 18 Feb 2019 09:19:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4D9429F6E for ; Mon, 18 Feb 2019 09:19:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2B3A29F75; Mon, 18 Feb 2019 09:19:50 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 C55CF29F6E for ; Mon, 18 Feb 2019 09:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729426AbfBRJTs (ORCPT ); Mon, 18 Feb 2019 04:19:48 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:38844 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728823AbfBRJTr (ORCPT ); Mon, 18 Feb 2019 04:19:47 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1I9Ivq8001024; Mon, 18 Feb 2019 09:19:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2018-07-02; bh=zlj4jXyQMKoW/ULbZxtGCW/39u+xi7MrC47HfzRcRP8=; b=Q7tIGSE4PYGZWeMFjrVqLhtpokHF2citjTkp6hNX9ZPwRAQKGv+rXEqQad5LhWA7Ngxm 3hfWbelY7p9RPOWibLzAX0qJh5AE9SLoOBXKRWZFTtHgSf51pT8GQhFVUxBo/K2Yt3yX r68eU7WDPSiEen9JJSJVlWc93MSjlLwBj1HEDUBgZ0QcMGc1XNCkyVs1GCOGqFOkYLkR PQ53w5yo8W0hU02/X6DCZORL4T0vZ51cSUyNUCV5VPnmjkcPoQDZtHzQ2rFQp4kr78bQ 4nfEcF2IDhizIaJvWnq7OqDMsLBqAYJbqT8wK6ec/aQTjhhEsFdLYv088Xb1thUr50xb Bg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2qp81dw9kp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Feb 2019 09:19:38 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1I9JWva001670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Feb 2019 09:19:32 GMT Received: from abhmp0022.oracle.com (abhmp0022.oracle.com [141.146.116.28]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1I9JWjQ008369; Mon, 18 Feb 2019 09:19:32 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Feb 2019 01:19:31 -0800 From: Yuval Shaia To: dledford@redhat.com, jgg@ziepe.ca, leon@kernel.org, yishaih@mellanox.com, matanb@mellanox.com, lariel@mellanox.com, linux-rdma@vger.kernel.org Cc: Yuval Shaia Subject: [PATCH] RDMA/core: Cosmetic change - move member initialization to correct block Date: Mon, 18 Feb 2019 11:19:19 +0200 Message-Id: <20190218091919.6176-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9170 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902180072 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 old_pd is used only if IB_MR_REREG_PD flags is set. For readability move it's initialization to where it is used. Signed-off-by: Yuval Shaia --- drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index d4f1a2ef5015..8d749bdcbdcd 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -810,12 +810,12 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs) } } - old_pd = mr->pd; ret = mr->device->ops.rereg_user_mr(mr, cmd.flags, cmd.start, cmd.length, cmd.hca_va, cmd.access_flags, pd, &attrs->driver_udata); if (!ret) { + old_pd = mr->pd; if (cmd.flags & IB_MR_REREG_PD) { atomic_inc(&pd->usecnt); mr->pd = pd;