RDMA/nldev: Refactor setting the nldev handle to a common function
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 1 Jan 2018 11:07:14 +0000 (13:07 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 2 Jan 2018 20:36:57 +0000 (13:36 -0700)
commitc2409810c0c9148bca4c3e13ac96dced1e4c11c5
tree13267c24fd220221f111cddc9bdde81ecd68bc2e
parent924b8900a49df284464db5d97362801f8a2ac7b4
RDMA/nldev: Refactor setting the nldev handle to a common function

The NLDEV commands are using IB device indexes and names as a handle
for netlink communications. Put all relevant code into one function
to remove code duplication in followup patches.

Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/nldev.c