Commit 45bf2472 authored by Zhu Yanjun's avatar Zhu Yanjun Committed by Jason Gunthorpe

RDMA/irdma: Remove the redundant variable

In the function irdma_puda_get_next_send_wqe, the variable wqe
is not necessary. So remove it.

Link: https://lore.kernel.org/r/20220323230135.291813-1-yanjun.zhu@intel.comSigned-off-by: default avatarZhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 31231092
...@@ -191,7 +191,6 @@ static void irdma_puda_dele_buf(struct irdma_sc_dev *dev, ...@@ -191,7 +191,6 @@ static void irdma_puda_dele_buf(struct irdma_sc_dev *dev,
static __le64 *irdma_puda_get_next_send_wqe(struct irdma_qp_uk *qp, static __le64 *irdma_puda_get_next_send_wqe(struct irdma_qp_uk *qp,
u32 *wqe_idx) u32 *wqe_idx)
{ {
__le64 *wqe = NULL;
int ret_code = 0; int ret_code = 0;
*wqe_idx = IRDMA_RING_CURRENT_HEAD(qp->sq_ring); *wqe_idx = IRDMA_RING_CURRENT_HEAD(qp->sq_ring);
...@@ -199,11 +198,9 @@ static __le64 *irdma_puda_get_next_send_wqe(struct irdma_qp_uk *qp, ...@@ -199,11 +198,9 @@ static __le64 *irdma_puda_get_next_send_wqe(struct irdma_qp_uk *qp,
qp->swqe_polarity = !qp->swqe_polarity; qp->swqe_polarity = !qp->swqe_polarity;
IRDMA_RING_MOVE_HEAD(qp->sq_ring, ret_code); IRDMA_RING_MOVE_HEAD(qp->sq_ring, ret_code);
if (ret_code) if (ret_code)
return wqe; return NULL;
wqe = qp->sq_base[*wqe_idx].elem;
return wqe; return qp->sq_base[*wqe_idx].elem;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment