linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: nsp_cs: remove variable i
@ 2022-10-24 14:11 Colin Ian King
  2022-10-27  2:16 ` Martin K. Petersen
  2022-11-08  4:01 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-10-24 14:11 UTC (permalink / raw)
  To: YOKOTA Hiroshi, James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

Variable i 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/pcmcia/nsp_cs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 48acab03a8a0..a5a1406a2bde 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -450,8 +450,6 @@ static int nsp_analyze_sdtr(struct scsi_cmnd *SCpnt)
 	sync_data	      *sync   = &(data->Sync[target]);
 	struct nsp_sync_table *sync_table;
 	unsigned int	       period, offset;
-	int		       i;
-
 
 	nsp_dbg(NSP_DEBUG_SYNC, "in");
 
@@ -466,7 +464,7 @@ static int nsp_analyze_sdtr(struct scsi_cmnd *SCpnt)
 		sync_table = nsp_sync_table_40M;
 	}
 
-	for ( i = 0; sync_table->max_period != 0; i++, sync_table++) {
+	for (; sync_table->max_period != 0; sync_table++) {
 		if ( period >= sync_table->min_period &&
 		     period <= sync_table->max_period	 ) {
 			break;
-- 
2.37.3


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

* Re: [PATCH] scsi: nsp_cs: remove variable i
  2022-10-24 14:11 [PATCH] scsi: nsp_cs: remove variable i Colin Ian King
@ 2022-10-27  2:16 ` Martin K. Petersen
  2022-11-08  4:01 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-10-27  2:16 UTC (permalink / raw)
  To: Colin Ian King
  Cc: YOKOTA Hiroshi, James E . J . Bottomley, Martin K . Petersen,
	linux-scsi, kernel-janitors, linux-kernel


Colin,

> Variable i 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: nsp_cs: remove variable i
  2022-10-24 14:11 [PATCH] scsi: nsp_cs: remove variable i Colin Ian King
  2022-10-27  2:16 ` Martin K. Petersen
@ 2022-11-08  4:01 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-11-08  4:01 UTC (permalink / raw)
  To: Colin Ian King, linux-scsi, YOKOTA Hiroshi, James E . J . Bottomley
  Cc: Martin K . Petersen, linux-kernel, kernel-janitors

On Mon, 24 Oct 2022 15:11:01 +0100, Colin Ian King wrote:

> Variable i 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: nsp_cs: remove variable i
      https://git.kernel.org/mkp/scsi/c/25ad6f63e77e

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2022-11-08  4:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 14:11 [PATCH] scsi: nsp_cs: remove variable i Colin Ian King
2022-10-27  2:16 ` Martin K. Petersen
2022-11-08  4:01 ` 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;
as well as URLs for NNTP newsgroup(s).