public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: csiostor: Remove unused variable n
@ 2022-11-01 12:32 Colin Ian King
  2022-11-08  3:41 ` Martin K. Petersen
  2022-11-17 18:29 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-11-01 12:32 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

Variable n is just being incremented and it's never used anywhere else. The
variable and the increment are redundant so remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/scsi/csiostor/csio_wr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
index fe0355c964bc..a516df019c22 100644
--- a/drivers/scsi/csiostor/csio_wr.c
+++ b/drivers/scsi/csiostor/csio_wr.c
@@ -1051,7 +1051,6 @@ csio_wr_process_fl(struct csio_hw *hw, struct csio_q *q,
 	struct csio_fl_dma_buf flb;
 	struct csio_dma_buf *buf, *fbuf;
 	uint32_t bufsz, len, lastlen = 0;
-	int n;
 	struct csio_q *flq = hw->wrm.q_arr[q->un.iq.flq_idx];
 
 	CSIO_DB_ASSERT(flq != NULL);
@@ -1071,7 +1070,7 @@ csio_wr_process_fl(struct csio_hw *hw, struct csio_q *q,
 	flb.totlen = len;
 
 	/* Consume all freelist buffers used for len bytes */
-	for (n = 0, fbuf = flb.flbufs; ; n++, fbuf++) {
+	for (fbuf = flb.flbufs; ; fbuf++) {
 		buf = &flq->un.fl.bufs[flq->cidx];
 		bufsz = csio_wr_fl_bufsz(sge, buf);
 
-- 
2.37.3


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

* Re: [PATCH] scsi: csiostor: Remove unused variable n
  2022-11-01 12:32 [PATCH] scsi: csiostor: Remove unused variable n Colin Ian King
@ 2022-11-08  3:41 ` Martin K. Petersen
  2022-11-17 18:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-11-08  3:41 UTC (permalink / raw)
  To: Colin Ian King
  Cc: James E . J . Bottomley, Martin K . Petersen, linux-scsi,
	kernel-janitors, linux-kernel


Colin,

> Variable n is just being incremented and it's never used anywhere
> else. The variable and the increment are redundant so remove it.

Applied to 6.2/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: csiostor: Remove unused variable n
  2022-11-01 12:32 [PATCH] scsi: csiostor: Remove unused variable n Colin Ian King
  2022-11-08  3:41 ` Martin K. Petersen
@ 2022-11-17 18:29 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-11-17 18:29 UTC (permalink / raw)
  To: James E . J . Bottomley, linux-scsi, Colin Ian King
  Cc: Martin K . Petersen, kernel-janitors, linux-kernel

On Tue, 1 Nov 2022 12:32:35 +0000, Colin Ian King wrote:

> Variable n is just being incremented and it's never used anywhere else. The
> variable and the increment are redundant so remove it.
> 
> 

Applied to 6.2/scsi-queue, thanks!

[1/1] scsi: csiostor: Remove unused variable n
      https://git.kernel.org/mkp/scsi/c/0aa46eba2955

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2022-11-17 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-01 12:32 [PATCH] scsi: csiostor: Remove unused variable n Colin Ian King
2022-11-08  3:41 ` Martin K. Petersen
2022-11-17 18:29 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox