diff mbox

RDMA/core: Remove indirection through ib_cache_setup()

Message ID 20180529023240.GA10495@ziepe.ca (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Jason Gunthorpe May 29, 2018, 2:32 a.m. UTC
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 <jgg@mellanox.com>
---
 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(-)

Comments

Leon Romanovsky May 29, 2018, 7:28 a.m. UTC | #1
On Mon, May 28, 2018 at 08:32:40PM -0600, Jason Gunthorpe wrote:
> 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 <jgg@mellanox.com>
> ---
>  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(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Jason Gunthorpe May 29, 2018, 8:06 p.m. UTC | #2
On Mon, May 28, 2018 at 08:32:40PM -0600, Jason Gunthorpe wrote:
> 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 <jgg@mellanox.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  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(-)

Applied to for-next

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);