提交 c86936e6 编写于 作者: L Leon Romanovsky 提交者: Jason Gunthorpe

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.orgReviewed-by: NMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 9c2ba4ed
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册