* [PATCH] RDMA/ocrdma: remove unused discard_cnt variable
@ 2023-03-26 12:09 Tom Rix
2023-03-29 11:28 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-26 12:09 UTC (permalink / raw)
To: selvin.xavier, jgg, leon, nathan, ndesaulniers, mgurtovoy
Cc: linux-rdma, linux-kernel, llvm, 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.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index dd4021b11963..58f994341e9a 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -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;
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] RDMA/ocrdma: remove unused discard_cnt variable
2023-03-26 12:09 [PATCH] RDMA/ocrdma: remove unused discard_cnt variable Tom Rix
@ 2023-03-29 11:28 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2023-03-29 11:28 UTC (permalink / raw)
To: selvin.xavier, jgg, nathan, ndesaulniers, mgurtovoy, Tom Rix
Cc: linux-rdma, linux-kernel, llvm
On Sun, 26 Mar 2023 08:09:59 -0400, Tom Rix wrote:
> 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,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-29 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 12:09 [PATCH] RDMA/ocrdma: remove unused discard_cnt variable Tom Rix
2023-03-29 11:28 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).