Skip to contentSkip to conversation

scsi: dc395x: remove unused variable fact

PATCH Applied Colin Ian King 2 participants 3 messages Jul 14 – Aug 6

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: dc395x: remove unused variable fact

The variable fact was used for debug but this was removed in commit 62b434b0db2c ("scsi: dc395x: Remove DEBUG conditional compilation"). The variable is now redundant and can be removed.

Cleans up clang scan build warning:
drivers/scsi/dc395x.c: In function ‘msgin_set_sync’:
drivers/scsi/dc395x.c:2185:13: warning: variable ‘fact’ set but not used [-Wunused-but-set-variable]
2185 | int fact;

---
 drivers/scsi/dc395x.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/scsi/dc395x.c +0 -6
index 6183ce05d8cf..ba490174a417 100644
@@ -2182,7 +2182,6 @@ static void msgin_set_sync(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb)
 {
 	struct DeviceCtlBlk *dcb = srb->dcb;
 	u8 bval;
-	int fact;
 
 	if (srb->msgin_buf[4] > 15)
 		srb->msgin_buf[4] = 15;
@@ -2205,11 +2204,6 @@ static void msgin_set_sync(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb)
 	dcb->sync_period |= ALT_SYNC | bval;
 	dcb->min_nego_period = srb->msgin_buf[3];
 
-	if (dcb->sync_period & WIDE_SYNC)
-		fact = 500;
-	else
-		fact = 250;
-
 	if (!(srb->state & SRB_DO_SYNC_NEGO)) {
 		/* Reply with corrected SDTR Message */
 
Signature · 1 line
2.53.0
#1 lore raw

Colin,

Quoted 3 lines

The variable fact was used for debug but this was removed in commit 62b434b0db2c ("scsi: dc395x: Remove DEBUG conditional compilation"). The variable is now redundant and can be removed.

Applied to 7.3/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen
#2 lore raw
In reply to Colin Ian King
Quoted 10 lines · Colin Ian King

The variable fact was used for debug but this was removed in commit 62b434b0db2c ("scsi: dc395x: Remove DEBUG conditional compilation"). The variable is now redundant and can be removed.

Cleans up clang scan build warning:
drivers/scsi/dc395x.c: In function ‘msgin_set_sync’:
drivers/scsi/dc395x.c:2185:13: warning: variable ‘fact’ set but not used [-Wunused-but-set-variable]
2185 | int fact;

[...]

Applied to 7.3/scsi-queue, thanks!

[1/1] scsi: dc395x: remove unused variable fact

      https://git.kernel.org/mkp/scsi/c/9b61402740eb
Signature · 1 line
Martin K. Petersen