Message ID | 20180706174203.GA32472@ziepe.ca (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On Fri, Jul 06, 2018 at 11:42:03AM -0600, Jason Gunthorpe wrote: > Instead we are now checking the function pointers directly. Get rid of > both cases in ioctl and drop the nonsense idea that destroy can fail. > > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> > --- > drivers/infiniband/core/uverbs_std_types_cq.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
On Fri, Jul 06, 2018 at 11:42:03AM -0600, Jason Gunthorpe wrote: > Instead we are now checking the function pointers directly. Get rid of > both cases in ioctl and drop the nonsense idea that destroy can fail. > > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> > Reviewed-by: Leon Romanovsky <leonro@mellanox.com> > --- > drivers/infiniband/core/uverbs_std_types_cq.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Applied to for-next, thanks Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/core/uverbs_std_types_cq.c b/drivers/infiniband/core/uverbs_std_types_cq.c index ce9c9c66bae42f..5a6154345fa043 100644 --- a/drivers/infiniband/core/uverbs_std_types_cq.c +++ b/drivers/infiniband/core/uverbs_std_types_cq.c @@ -70,7 +70,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_CREATE)(struct ib_device *ib_dev, struct ib_uverbs_completion_event_file *ev_file = NULL; struct ib_uobject *ev_file_uobj; - if (!(ib_dev->uverbs_cmd_mask & 1ULL << IB_USER_VERBS_CMD_CREATE_CQ)) + if (!ib_dev->create_cq || !ib_dev->destroy_cq) return -EOPNOTSUPP; ret = uverbs_copy_from(&attr.comp_vector, attrs, @@ -185,9 +185,6 @@ static int UVERBS_HANDLER(UVERBS_METHOD_CQ_DESTROY)(struct ib_device *ib_dev, obj = container_of(uobj, struct ib_ucq_object, uobject); - if (!(ib_dev->uverbs_cmd_mask & 1ULL << IB_USER_VERBS_CMD_DESTROY_CQ)) - return -EOPNOTSUPP; - ret = rdma_explicit_destroy(uobj); if (ret) return ret;
Instead we are now checking the function pointers directly. Get rid of both cases in ioctl and drop the nonsense idea that destroy can fail. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> --- drivers/infiniband/core/uverbs_std_types_cq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)