diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-04-08 01:20:09 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-04-14 21:05:08 +0200 |
commit | 1587982e705db1ac090b05a7006771c78d0e8417 (patch) | |
tree | 6a6d1365df73bc3a48c2512498a12723ad6bce8f /drivers/infiniband/ulp/srpt | |
parent | RDMA/uverbs: Make the event_queue fds return POLLERR when disassociated (diff) | |
download | linux-1587982e705db1ac090b05a7006771c78d0e8417.tar.xz linux-1587982e705db1ac090b05a7006771c78d0e8417.zip |
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 'drivers/infiniband/ulp/srpt')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 98552749d71c..9d02d8088f1c 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -135,14 +135,11 @@ static bool srpt_set_ch_state(struct srpt_rdma_ch *ch, enum rdma_ch_state new) static void srpt_event_handler(struct ib_event_handler *handler, struct ib_event *event) { - struct srpt_device *sdev; + struct srpt_device *sdev = + container_of(handler, struct srpt_device, event_handler); struct srpt_port *sport; u8 port_num; - sdev = ib_get_client_data(event->device, &srpt_client); - if (!sdev || sdev->device != event->device) - return; - pr_debug("ASYNC event= %d on device= %s\n", event->event, dev_name(&sdev->device->dev)); |