summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-12-21 16:19:25 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-12-21 11:39:38 -0700
commite9dd5daf884cf591f9c9a122351d2f9ccf7b97d3 (patch)
tree0853ff10e38b660002834dffc798d1c888a6b167 /mm
parentcf7ad3030271c55a7119a8c2162563e3f6e93879 (diff)
downloadlinux-e9dd5daf884cf591f9c9a122351d2f9ccf7b97d3.tar.bz2
IB/umad: Refactor code to use cdev_device_add()
Refactor code to use cdev_device_add() and do other minor refactors while modifying these functions as below. 1. Instead of returning generic -1, return an actual error for ib_umad_init_port(). 2. Introduce and use ib_umad_init_port_dev() for sm and umad char devices. 3. Instead of kobj, use more light weight kref to refcount ib_umad_device. 4. Use modern cdev_device_add() single code cut down three steps of cdev_add(), device_create(). This further helps to move device sysfs files to class attributes in subsequent patch. 5. Remove few empty lines while refactoring these functions. 6. Use sizeof() instead of sizeof to avoid checkpatch warning. 7. Use struct_size() for calculation of ib_umad_port. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Jack Morgenstein <jackm@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions