Skip to content

Commit 3540669

Browse files
Colin Ian Kingdavem330
authored andcommitted
qed: fix assignment of n_rq_elems to incorrect params field
Currently n_rq_elems is being assigned to params.elem_size instead of the field params.num_elems. Coverity is detecting this as a double assingment to params.elem_size and reporting this as an usused value on the first assignment. Fix this. Addresses-Coverity: ("Unused value") Fixes: b6db3f7 ("qed: simplify chain allocation with init params struct") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Alexander Lobakin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 86f968a commit 3540669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/qedr/verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,7 @@ qedr_roce_create_kernel_qp(struct qedr_dev *dev,
19231923
in_params->sq_pbl_ptr = qed_chain_get_pbl_phys(&qp->sq.pbl);
19241924

19251925
params.intended_use = QED_CHAIN_USE_TO_CONSUME_PRODUCE;
1926-
params.elem_size = n_rq_elems;
1926+
params.num_elems = n_rq_elems;
19271927
params.elem_size = QEDR_RQE_ELEMENT_SIZE;
19281928

19291929
rc = dev->ops->common->chain_alloc(dev->cdev, &qp->rq.pbl, &params);

0 commit comments

Comments
 (0)