diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-25 20:51:20 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-11-26 16:48:07 -0700 |
commit | 07f05f40d956d40f32852a7b3ff109a72d254cf9 (patch) | |
tree | b92baff7535b981cb6590e49a070f5935b30d5cc /drivers/infiniband/core/uverbs_std_types_cq.c | |
parent | RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write (diff) | |
download | linux-dev-07f05f40d956d40f32852a7b3ff109a72d254cf9.tar.xz linux-dev-07f05f40d956d40f32852a7b3ff109a72d254cf9.zip |
RDMA/uverbs: Use uverbs_attr_bundle to pass udata for ioctl()
Have the core code initialize the driver_udata if the method has a udata
description. This is done using the same create_udata the handler was
supposed to call.
This makes ioctl consistent with the write and write_ex paths.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_cq.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_std_types_cq.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types_cq.c b/drivers/infiniband/core/uverbs_std_types_cq.c index 859d1e862034..859518eab583 100644 --- a/drivers/infiniband/core/uverbs_std_types_cq.c +++ b/drivers/infiniband/core/uverbs_std_types_cq.c @@ -64,7 +64,6 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)( uverbs_attr_get_uobject(attrs, UVERBS_ATTR_CREATE_CQ_HANDLE), typeof(*obj), uobject); struct ib_device *ib_dev = obj->uobject.context->device; - struct ib_udata uhw; int ret; u64 user_handle; struct ib_cq_init_attr attr = {}; @@ -111,10 +110,8 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)( INIT_LIST_HEAD(&obj->comp_list); INIT_LIST_HEAD(&obj->async_list); - /* Temporary, only until drivers get the new uverbs_attr_bundle */ - create_udata(attrs, &uhw); - - cq = ib_dev->create_cq(ib_dev, &attr, obj->uobject.context, &uhw); + cq = ib_dev->create_cq(ib_dev, &attr, obj->uobject.context, + &attrs->driver_udata); if (IS_ERR(cq)) { ret = PTR_ERR(cq); goto err_event_file; |