Skip to content

Commit

Permalink
RDMA/mlx5: Remove duplicated assignment to variable rcqe_sz
Browse files Browse the repository at this point in the history
The variable rcqe_sz is being unnecessarily assigned twice, fix this by
removing one of the duplicates.

Fixes: 8bde2c5 ("RDMA/mlx5: Update all DRIVER QP places to use QP subtype")
Link: https://lore.kernel.org/r/20200507151610.52636-1-colin.king@canonical.com
Addresses-Coverity: ("Evaluation order violation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Colin Ian King authored and Jason Gunthorpe committed May 8, 2020
1 parent 42caf9c commit 52c81f4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/hw/mlx5/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1994,8 +1994,7 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
if ((qp->flags_en & MLX5_QP_FLAG_SCATTER_CQE) &&
(init_attr->qp_type == IB_QPT_RC ||
init_attr->qp_type == IB_QPT_UC)) {
int rcqe_sz = rcqe_sz =
mlx5_ib_get_cqe_size(init_attr->recv_cq);
int rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq);

MLX5_SET(qpc, qpc, cs_res,
rcqe_sz == 128 ? MLX5_RES_SCAT_DATA64_CQE :
Expand Down

0 comments on commit 52c81f4

Please sign in to comment.