提交 35406697 编写于 作者: C Colin Ian King 提交者: David S. Miller

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: b6db3f71 ("qed: simplify chain allocation with init params struct")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NAlexander Lobakin <alobakin@marvell.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 86f968a0
......@@ -1923,7 +1923,7 @@ qedr_roce_create_kernel_qp(struct qedr_dev *dev,
in_params->sq_pbl_ptr = qed_chain_get_pbl_phys(&qp->sq.pbl);
params.intended_use = QED_CHAIN_USE_TO_CONSUME_PRODUCE;
params.elem_size = n_rq_elems;
params.num_elems = n_rq_elems;
params.elem_size = QEDR_RQE_ELEMENT_SIZE;
rc = dev->ops->common->chain_alloc(dev->cdev, &qp->rq.pbl, &params);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册