Skip to contentSkip to conversation

RDMA/ocrdma: remove unused discard_cnt variable

PATCH Applied Tom Rix 2 participants 2 messages Mar 26, 2023 – Mar 29, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 RDMA/ocrdma: remove unused discard_cnt variable

clang with W=1 reports drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1592:6: error: variable
'discard_cnt' set but not used [-Werror,-Wunused-but-set-variable]

        int discard_cnt = 0;
            ^

This variable is not used so remove it.

---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 --
 1 file changed, 2 deletions(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +0 -2
index dd4021b11963..58f994341e9a 100644
@@ -1589,7 +1589,6 @@ static void ocrdma_discard_cqes(struct ocrdma_qp *qp, struct ocrdma_cq *cq)
 {
 	unsigned long cq_flags;
 	unsigned long flags;
-	int discard_cnt = 0;
 	u32 cur_getp, stop_getp;
 	struct ocrdma_cqe *cqe;
 	u32 qpn = 0, wqe_idx = 0;
@@ -1641,7 +1640,6 @@ static void ocrdma_discard_cqes(struct ocrdma_qp *qp, struct ocrdma_cq *cq)
 		/* mark cqe discarded so that it is not picked up later
 		 * in the poll_cq().
 		 */
-		discard_cnt += 1;
 		cqe->cmn.qpn = 0;
 skip_cqe:
 		cur_getp = (cur_getp + 1) % cq->max_hw_cqe;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Tom Rix

clang with W=1 reports drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1592:6: error: variable
'discard_cnt' set but not used [-Werror,-Wunused-but-set-variable]

        int discard_cnt = 0;
            ^

This variable is not used so remove it.

[...]

Applied, thanks!

[1/1] RDMA/ocrdma: remove unused discard_cnt variable

      https://git.kernel.org/rdma/rdma/c/cba968e33e5df0

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>