RDMA/mlx5: Organize QP types checks in one place
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 27 Apr 2020 15:46:01 +0000 (18:46 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 28 Apr 2020 23:42:20 +0000 (20:42 -0300)
commit6eb7edffb28558aaa3a3e625ac9dcd40fc603bc6
treeef0d4caeb1a89ba7df79123a5b89cf05a244a2e8
parent2dc8b5246d2c94f732c02e7a688d8a9c0c65361f
RDMA/mlx5: Organize QP types checks in one place

Perform check if QP type is supported in one place at the beginning of
the create_qp function instead of current implementation with checks
buried inside of the code.

Link: https://lore.kernel.org/r/20200427154636.381474-2-leon@kernel.org
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qp.c