aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_main.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-01-08 19:22:01 +0200
committerJason Gunthorpe <jgg@mellanox.com>2020-01-13 16:20:16 -0400
commite04dd13159b0ddc0ff7f5e110bf99af3c65fabd3 (patch)
tree1560cb0d27cbd7ad176c7282b3d19bb3e487d757 /drivers/infiniband/core/uverbs_main.c
parentRDMA/core: Do not erase the type of ib_srq.uobject (diff)
downloadlinux-dev-e04dd13159b0ddc0ff7f5e110bf99af3c65fabd3.tar.xz
linux-dev-e04dd13159b0ddc0ff7f5e110bf99af3c65fabd3.zip
RDMA/core: Do not erase the type of ib_wq.uobject
This is a struct ib_uwq_object pointer, instead of using container_of() all over the place just store it with its actual type. Link: https://lore.kernel.org/r/1578504126-9400-10-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/core/uverbs_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index a501f76bc2f9..87f7a94adf57 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -481,8 +481,7 @@ void ib_uverbs_qp_event_handler(struct ib_event *event, void *context_ptr)
void ib_uverbs_wq_event_handler(struct ib_event *event, void *context_ptr)
{
- struct ib_uevent_object *uobj = container_of(event->element.wq->uobject,
- struct ib_uevent_object, uobject);
+ struct ib_uevent_object *uobj = &event->element.wq->uobject->uevent;
ib_uverbs_async_handler(context_ptr, uobj->uobject.user_handle,
event->event, &uobj->event_list,