Skip to content

Commit

Permalink
bnxt_re/lib: Remove unnecessary variable
Browse files Browse the repository at this point in the history
Remove pcqe and return directly

Signed-off-by: Selvin Xavier <[email protected]>
  • Loading branch information
selvintxavier committed Nov 16, 2023
1 parent 0840465 commit 0b19f94
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions providers/bnxt_re/verbs.c
Expand Up @@ -466,7 +466,6 @@ static uint8_t bnxt_re_poll_success_scqe(struct bnxt_re_qp *qp,
{
struct bnxt_re_queue *sq = qp->jsqq->hwque;
struct bnxt_re_wrid *swrid;
uint8_t pcqe = false;
uint32_t cindx;
uint32_t head;

Expand Down Expand Up @@ -494,29 +493,27 @@ static uint8_t bnxt_re_poll_success_scqe(struct bnxt_re_qp *qp,
bnxt_re_jqq_mod_last(qp->jsqq, head);

if (qp->jsqq->last_idx != cindx)
pcqe = true;
return true;

return pcqe;
return false;
}

static uint8_t bnxt_re_poll_scqe(struct bnxt_re_qp *qp, struct ibv_wc *ibvwc,
void *cqe, int *cnt)
{
struct bnxt_re_bcqe *hdr;
struct bnxt_re_req_cqe *scqe;
uint8_t status, pcqe = false;
struct bnxt_re_bcqe *hdr;
uint8_t status;

scqe = cqe;
hdr = cqe + sizeof(struct bnxt_re_req_cqe);

status = (le32toh(hdr->flg_st_typ_ph) >> BNXT_RE_BCQE_STATUS_SHIFT) &
BNXT_RE_BCQE_STATUS_MASK;
if (likely(status == BNXT_RE_REQ_ST_OK))
pcqe = bnxt_re_poll_success_scqe(qp, ibvwc, hdr, scqe, cnt);
return bnxt_re_poll_success_scqe(qp, ibvwc, hdr, scqe, cnt);
else
pcqe = bnxt_re_poll_err_scqe(qp, ibvwc, hdr, scqe, cnt);

return pcqe;
return bnxt_re_poll_err_scqe(qp, ibvwc, hdr, scqe, cnt);
}

static void bnxt_re_release_srqe(struct bnxt_re_srq *srq, int tag)
Expand Down

0 comments on commit 0b19f94

Please sign in to comment.