From patchwork Tue May 29 02:32:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10434279 X-Patchwork-Delegate: jgg@ziepe.ca 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 CC01460327 for ; Tue, 29 May 2018 02:33:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD7A12842A for ; Tue, 29 May 2018 02:33:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A10A228437; Tue, 29 May 2018 02:33:08 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 B2AB42842A for ; Tue, 29 May 2018 02:33:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755483AbeE2CdF (ORCPT ); Mon, 28 May 2018 22:33:05 -0400 Received: from mail-eopbgr10055.outbound.protection.outlook.com ([40.107.1.55]:61168 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755414AbeE2CdD (ORCPT ); Mon, 28 May 2018 22:33:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PiuGu9KpgBKaQO99HwAUCQrLpjs19z0K0Pp0PCVZxA0=; b=TTfT47XZTQXkDnQ+SPDVsudVCxgH9tGGpO43/nMm47+OXLeja9jXpRM/+OChvuG5ZDp9EOpZLvHLHe8+cv2ovvuzxM6oHJV7DKNqEviM7RBpKZc4+J4fEPEZvh+rX/5XxkZe2dYS2qK975A5reI6YyGUeshCPnwxQK4YQP8WQUk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from mlx.ziepe.ca (174.3.196.123) by DB7PR05MB4458.eurprd05.prod.outlook.com (2603:10a6:5:1b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Tue, 29 May 2018 02:33:00 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1fNURE-0002je-4M for linux-rdma@vger.kernel.org; Mon, 28 May 2018 20:32:40 -0600 Date: Mon, 28 May 2018 20:32:40 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Subject: [PATCH] RDMA/core: Remove indirection through ib_cache_setup() Message-ID: <20180529023240.GA10495@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [174.3.196.123] X-ClientProxiedBy: MWHPR1001CA0010.namprd10.prod.outlook.com (2603:10b6:301:2a::23) To DB7PR05MB4458.eurprd05.prod.outlook.com (2603:10a6:5:1b::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4458; X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4458; 3:HB5Vw/gy2LMl8BxV9AuYoTS6x3Kz5U6eKcuhCloSQM1laLqk1Q1UU8YK4Ba9a4fER6PSZakGhGQz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RZBveCNL1d2MO7W78tjaljclsrpTZ75uBGDpX6mG6o/Lzbo/ljAF4pmRB+8xfIh3c4fgsYbWx4eMfCQ4SquM9n5OAWHHDLnLKogeKCCNsNdBCSWr7qATPXbJXPnPQjvVJLEn6sdPlldvi2v1fBuzwcDtiFJy0zuMcOes1crph1tDJGd1obJBEF8lBB+VVhGS2OBysZ1yoel914CgfsVnMDzEdzu+9ErZgiirJlgH7yAC7wNZdCAl6MJsaklS3eI7iitlSx5NS9VgE6xdMCc5wBy4d; 4:kCycGYjYAQBdLxiRvUbvSZnMIkFLg7Qh34rBIll2lBY5uvJ6Ov4kGWFQKSHTUAuERn6Mbdhh8D4KW6Ws2okfEkq5oFAXuacqCjD7ex7ynxdh6uOBTXVWZAY92GNeFKyFVVay59b0zRuMI4opvE5CWkQHCMRB99e31jG7DzoLt9/kMIj25COPo3+wN5+0aouu4l8MIEsUqkaIio0Pk331FDmyLtPryqjOw6nwmMIgklyfPUiseClvYQaOW/A9twdUQlsabNy24Arl+eEZFiwTUA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4458; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4458; X-Forefront-PRVS: 0687389FB0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39380400002)(39860400002)(376002)(396003)(199004)(189003)(122856001)(6116002)(52116002)(316002)(57986006)(2361001)(16586007)(2351001)(58126008)(186003)(1857600001)(66066001)(486006)(5660300001)(33656002)(46656002)(47776003)(36756003)(478600001)(97736004)(83796002)(81156014)(9746002)(81166006)(26005)(68736007)(8936002)(9786002)(386003)(1076002)(476003)(33896004)(6916009)(8676002)(69596002)(105586002)(86362001)(50466002)(3846002)(9686003)(7736002)(2906002)(106356001)(305945005)(53936002)(23726003)(18370500001)(24400500001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4458; H:mlx.ziepe.ca; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB7PR05MB4458; 23:6RQD4YkdmcOtTEdN/JfE2gG3uFiu8FtmDo/eBz4Xg?= =?us-ascii?Q?3g0esjU2y7xfT2lGErQmUr0muFMKkfJSzFObAb+P72shz9BTaMSPYEe0cByh?= =?us-ascii?Q?EQ+sjCncSl7vbRd550pOeGds4naWayjah7XaRW3nkClHEKd4j6gPUlqo0WZc?= =?us-ascii?Q?+Fvg7uAkQg6qWLhAbPq9oFx3kfjZDvrVxVtKNUzMD0cQXxTqn16eu9Kg75xg?= =?us-ascii?Q?gLuTYOkj7ziQ/uoKiytA7N3SQgftctb0odlxt66mIE99Iv/YJps3a7BGcCea?= =?us-ascii?Q?dpg7+ggSo82ZmM4xkuz4+whloHnJ/keRanEkX1tZD7S6Asjh+MLSg9HCv857?= =?us-ascii?Q?17YCMQlaFs/4b2gca8N1qiUbXcFn8tEM1U+7tZ1Yf8QZIjIxKKObyyC9ac+Y?= =?us-ascii?Q?NZo+/XV3bYAXhnP45f8m1dq5X2IST46F2GrUxsfxxdy/CCkA83x6+gkPkWFb?= =?us-ascii?Q?pAk9ozkblhz1bQd4683P+AgZL4KQzEcx9ckGdBIGLf4Yd3BrGV5UTfSIOUK9?= =?us-ascii?Q?cHdGKOpFsLTbXYB2AN2+U1Ti/LGZBuTV93Gh9BdX/Jkw5JljYKOZY/wgUEaE?= =?us-ascii?Q?BFXOlr5fcZX0W/B1jH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6U1taIsDJ4F80fV0VNLidM6/1SJW1SFyWBTAXa+mINJqnY989e+mWQQZ+14l7fb7hOTvMWTL6NkyiEAlGS X-MS-Office365-Filtering-Correlation-Id: 47c3316e-7e2a-4ed0-fe13-08d5c50c7f49 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2018 02:33:00.6909 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47c3316e-7e2a-4ed0-fe13-08d5c50c7f49 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4458 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 This once might have made sense when cache.c was in a different module from device.c, but today it just obfuscation. Get rid of the wrappers and call roge_gid_mgmt_init()/cleanup() directly. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky --- drivers/infiniband/core/cache.c | 10 ---------- drivers/infiniband/core/core_priv.h | 3 --- drivers/infiniband/core/device.c | 4 ++-- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 0d11538c2a258b..2bdfc4b4a15ce8 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -1295,13 +1295,3 @@ void ib_cache_cleanup_one(struct ib_device *device) flush_workqueue(ib_wq); gid_table_cleanup_one(device); } - -void __init ib_cache_setup(void) -{ - roce_gid_mgmt_init(); -} - -void __exit ib_cache_cleanup(void) -{ - roce_gid_mgmt_cleanup(); -} diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h index 54163a6e4067f3..fae417a391fb25 100644 --- a/drivers/infiniband/core/core_priv.h +++ b/drivers/infiniband/core/core_priv.h @@ -88,9 +88,6 @@ int ib_device_register_sysfs(struct ib_device *device, u8, struct kobject *)); void ib_device_unregister_sysfs(struct ib_device *device); -void ib_cache_setup(void); -void ib_cache_cleanup(void); - typedef void (*roce_netdev_callback)(struct ib_device *device, u8 port, struct net_device *idev, void *cookie); diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index ea9fbcfb21bd4a..84f51386e1e30b 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -1225,7 +1225,7 @@ static int __init ib_core_init(void) nldev_init(); rdma_nl_register(RDMA_NL_LS, ibnl_ls_cb_table); - ib_cache_setup(); + roce_gid_mgmt_init(); return 0; @@ -1248,7 +1248,7 @@ static int __init ib_core_init(void) static void __exit ib_core_cleanup(void) { - ib_cache_cleanup(); + roce_gid_mgmt_cleanup(); nldev_exit(); rdma_nl_unregister(RDMA_NL_LS); unregister_lsm_notifier(&ibdev_lsm_nb);