mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
This commit is contained in:
parent
8ea175f005
commit
7527a7b157
5 changed files with 16 additions and 21 deletions
|
|
@ -313,10 +313,8 @@ EXPORT_SYMBOL(rdmacg_try_charge);
|
|||
* If IB stack wish a device to participate in rdma cgroup resource
|
||||
* tracking, it must invoke this API to register with rdma cgroup before
|
||||
* any user space application can start using the RDMA resources.
|
||||
* Returns 0 on success or EINVAL when table length given is beyond
|
||||
* supported size.
|
||||
*/
|
||||
int rdmacg_register_device(struct rdmacg_device *device)
|
||||
void rdmacg_register_device(struct rdmacg_device *device)
|
||||
{
|
||||
INIT_LIST_HEAD(&device->dev_node);
|
||||
INIT_LIST_HEAD(&device->rpools);
|
||||
|
|
@ -324,7 +322,6 @@ int rdmacg_register_device(struct rdmacg_device *device)
|
|||
mutex_lock(&rdmacg_mutex);
|
||||
list_add_tail(&device->dev_node, &rdmacg_devices);
|
||||
mutex_unlock(&rdmacg_mutex);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(rdmacg_register_device);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue