summaryrefslogtreecommitdiff
path: root/net/smc/smc_ib.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-04-07 20:20:09 -0300
committerJason Gunthorpe <jgg@mellanox.com>2020-04-14 16:05:08 -0300
commit1587982e705db1ac090b05a7006771c78d0e8417 (patch)
tree6a6d1365df73bc3a48c2512498a12723ad6bce8f /net/smc/smc_ib.c
parenteb356e6dc15a30af604f052cd0e170450193c254 (diff)
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>
Diffstat (limited to 'net/smc/smc_ib.c')
-rw-r--r--net/smc/smc_ib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/smc/smc_ib.c b/net/smc/smc_ib.c
index 04b6fefb8bce..e7e7c3c6e94a 100644
--- a/net/smc/smc_ib.c
+++ b/net/smc/smc_ib.c
@@ -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);