RDMA: Remove a few extra calls to ib_get_client_data()

These four places already have easy access to the client data, just use
that instead.

Link: https://lore.kernel.org/r/0-v1-fae83f600b4a+68-less_get_client_data%25jgg@mellanox.com
Acked-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Jason Gunthorpe
2020-04-07 20:20:09 -03:00
parent eb356e6dc1
commit 1587982e70
3 changed files with 9 additions and 16 deletions

View File

@@ -588,9 +588,8 @@ static void smc_ib_add_dev(struct ib_device *ibdev)
/* callback function for ib_unregister_client() */
static void smc_ib_remove_dev(struct ib_device *ibdev, void *client_data)
{
struct smc_ib_device *smcibdev;
struct smc_ib_device *smcibdev = client_data;
smcibdev = ib_get_client_data(ibdev, &smc_ib_client);
if (!smcibdev || smcibdev->ibdev != ibdev)
return;
ib_set_client_data(ibdev, &smc_ib_client, NULL);