aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cgroup.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-01-17 20:14:15 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-01-18 13:43:10 -0700
commit7527a7b157d1191b23562ed70154ae93bd65f845 (patch)
tree382fd749193a6ce689785824694c09a51edea3e4 /drivers/infiniband/core/cgroup.c
parentRDMA/qedr: remove set but not used variable 'ib_ctx' (diff)
downloadlinux-dev-7527a7b157d1191b23562ed70154ae93bd65f845.tar.xz
linux-dev-7527a7b157d1191b23562ed70154ae93bd65f845.zip
IB/core: Simplify rdma cgroup registration
RDMA cgroup registration routine always returns success, so simplify function to be void and run clang formatter over whole CONFIG_CGROUP_RDMA art of core_priv.h. This reduces unwinding error path for regular registration and future net namespace change functionality for rdma device. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/cgroup.c')
-rw-r--r--drivers/infiniband/core/cgroup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/core/cgroup.c b/drivers/infiniband/core/cgroup.c
index 126ac5f99db7..388fd04e5f63 100644
--- a/drivers/infiniband/core/cgroup.c
+++ b/drivers/infiniband/core/cgroup.c
@@ -21,12 +21,11 @@
* Register with the rdma cgroup. Should be called before
* exposing rdma device to user space applications to avoid
* resource accounting leak.
- * Returns 0 on success or otherwise failure code.
*/
-int ib_device_register_rdmacg(struct ib_device *device)
+void ib_device_register_rdmacg(struct ib_device *device)
{
device->cg_device.name = device->name;
- return rdmacg_register_device(&device->cg_device);
+ rdmacg_register_device(&device->cg_device);
}
/**