aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/rdma_core.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-11-25 20:51:14 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-11-26 16:48:07 -0700
commit7106a9769715bb4c0448927a29aa3b505855871c (patch)
tree48bfaac92a7adfedbf50c224bf054f519008c3b4 /drivers/infiniband/core/rdma_core.c
parentRDMA/uverbs: Replace ib_uverbs_file with uverbs_attr_bundle for write (diff)
downloadlinux-dev-7106a9769715bb4c0448927a29aa3b505855871c.tar.xz
linux-dev-7106a9769715bb4c0448927a29aa3b505855871c.zip
RDMA/uverbs: Make write() handlers return 0 on success
Currently they return the command length, while all other handlers return 0. This makes the write path closer to the write_ex and ioctl path. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.c')
-rw-r--r--drivers/infiniband/core/rdma_core.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/infiniband/core/rdma_core.c b/drivers/infiniband/core/rdma_core.c
index cf671a643d4c..efa292489271 100644
--- a/drivers/infiniband/core/rdma_core.c
+++ b/drivers/infiniband/core/rdma_core.c
@@ -245,13 +245,11 @@ struct ib_uobject *__uobj_get_destroy(const struct uverbs_api_object *obj,
}
/*
- * Does both uobj_get_destroy() and uobj_put_destroy(). Returns success_res
- * on success (negative errno on failure). For use by callers that do not need
- * the uobj.
+ * Does both uobj_get_destroy() and uobj_put_destroy(). Returns 0 on success
+ * (negative errno on failure). For use by callers that do not need the uobj.
*/
int __uobj_perform_destroy(const struct uverbs_api_object *obj, u32 id,
- const struct uverbs_attr_bundle *attrs,
- int success_res)
+ const struct uverbs_attr_bundle *attrs)
{
struct ib_uobject *uobj;
@@ -260,7 +258,7 @@ int __uobj_perform_destroy(const struct uverbs_api_object *obj, u32 id,
return PTR_ERR(uobj);
rdma_lookup_put_uobject(uobj, UVERBS_LOOKUP_WRITE);
- return success_res;
+ return 0;
}
/* alloc_uobj must be undone by uverbs_destroy_uobject() */