Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ef8c0c1 authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

RDMA/core: Remove indirection through ib_cache_setup()



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: default avatarJason Gunthorpe <jgg@mellanox.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
parent 0394808d
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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();
}
+0 −3
Original line number Diff line number Diff line
@@ -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);

+2 −2
Original line number Diff line number Diff line
@@ -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);