linux/drivers/infiniband
Parav Pandit e9dd5daf88 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>
2018-12-21 11:39:38 -07:00
..
core IB/umad: Refactor code to use cdev_device_add() 2018-12-21 11:39:38 -07:00
hw IB/mlx5: Fix wrong error unwind 2018-12-20 20:49:31 -07:00
sw IB/rxe: Reuse code which sets port state 2018-12-20 14:20:58 -07:00
ulp RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
Kconfig RDMA: Fix building with CONFIG_MMU=n 2018-10-03 16:01:03 -06:00
Makefile