linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/hw/qib/qib_tx: Remove variable n
@ 2022-10-21 17:26 Colin Ian King
  2022-10-24 11:32 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-21 17:26 UTC (permalink / raw)
  To: Dennis Dalessandro, Jason Gunthorpe, Leon Romanovsky, linux-rdma
  Cc: kernel-janitors, linux-kernel

The variable n being incremented but it is never referenced,
it is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/infiniband/hw/qib/qib_tx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_tx.c b/drivers/infiniband/hw/qib/qib_tx.c
index 6a8148851f21..1325110237cd 100644
--- a/drivers/infiniband/hw/qib/qib_tx.c
+++ b/drivers/infiniband/hw/qib/qib_tx.c
@@ -82,7 +82,6 @@ int qib_disarm_piobufs_ifneeded(struct qib_ctxtdata *rcd)
 	struct qib_devdata *dd = rcd->dd;
 	unsigned i;
 	unsigned last;
-	unsigned n = 0;
 
 	last = rcd->pio_base + rcd->piocnt;
 	/*
@@ -102,10 +101,8 @@ int qib_disarm_piobufs_ifneeded(struct qib_ctxtdata *rcd)
 	}
 	spin_lock_irq(&dd->pioavail_lock);
 	for (i = rcd->pio_base; i < last; i++) {
-		if (__test_and_clear_bit(i, dd->pio_need_disarm)) {
-			n++;
+		if (__test_and_clear_bit(i, dd->pio_need_disarm))
 			dd->f_sendctrl(rcd->ppd, QIB_SENDCTRL_DISARM_BUF(i));
-		}
 	}
 	spin_unlock_irq(&dd->pioavail_lock);
 	return 0;
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/hw/qib/qib_tx: Remove variable n
  2022-10-21 17:26 [PATCH] RDMA/hw/qib/qib_tx: Remove variable n Colin Ian King
@ 2022-10-24 11:32 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2022-10-24 11:32 UTC (permalink / raw)
  To: linux-rdma, Dennis Dalessandro, Colin Ian King, Jason Gunthorpe
  Cc: linux-kernel, kernel-janitors

On Fri, 21 Oct 2022 18:26:11 +0100, Colin Ian King wrote:
> The variable n being incremented but it is never referenced,
> it is redundant and can be removed.
> 
> 

Applied, thanks!

[1/1] RDMA/hw/qib/qib_tx: Remove variable n
      https://git.kernel.org/rdma/rdma/c/d0b9f28f0da280

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-24 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 17:26 [PATCH] RDMA/hw/qib/qib_tx: Remove variable n Colin Ian King
2022-10-24 11:32 ` 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).