diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2020-04-27 18:46:05 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-04-29 02:42:21 +0300 |
commit | c86936e6eb13bf3759e4cc0629ccc0076dd763de (patch) | |
tree | 1377244f45bacb7c21f9b3641440ebc13d168f2c | |
parent | 9c2ba4ede4c0166d4e3bdc15e3b32c9680309ca1 (diff) | |
download | linux-c86936e6eb13bf3759e4cc0629ccc0076dd763de.tar.xz |
RDMA/mlx5: Avoid setting redundant NULL for XRC QPs
There is no need to set NULL in recv_cq and send_cq, they are already
set to NULL by the IB/core logic.
Link: https://lore.kernel.org/r/20200427154636.381474-6-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>
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 07df470e0d58..86933a2023dc 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -2771,14 +2771,8 @@ struct ib_qp *mlx5_ib_create_qp(struct ib_pd *pd, } } - if (init_attr->qp_type == IB_QPT_XRC_TGT) { - init_attr->recv_cq = NULL; + if (init_attr->qp_type == IB_QPT_XRC_TGT) xrcdn = to_mxrcd(init_attr->xrcd)->xrcdn; - init_attr->send_cq = NULL; - } - - if (init_attr->qp_type == IB_QPT_XRC_INI) - init_attr->recv_cq = NULL; err = create_qp_common(dev, pd, init_attr, udata, qp); if (err) { |