From: Leon Romanovsky Date: Mon, 27 Apr 2020 15:46:05 +0000 (+0300) Subject: RDMA/mlx5: Avoid setting redundant NULL for XRC QPs X-Git-Tag: v5.10.7~2431^2~208^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c86936e6eb13bf3759e4cc0629ccc0076dd763de;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 07df470..86933a2 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) {