Skip to contentSkip to conversation

scsi: BusLogic: remove variable adapter_count

PATCH Applied Colin Ian King 3 participants 4 messages Oct 31, 2022 – Nov 17, 2022

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

PATCH 1/1 scsi: BusLogic: remove variable adapter_count

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

---
 drivers/scsi/BusLogic.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/BusLogic.c +2 -4
index f2abffce2659..f7b7ffda1161 100644
@@ -2198,7 +2198,7 @@ static int blogic_slaveconfig(struct scsi_device *dev)
 
 static int __init blogic_init(void)
 {
-	int adapter_count = 0, drvr_optindex = 0, probeindex;
+	int drvr_optindex = 0, probeindex;
 	struct blogic_adapter *adapter;
 	int ret = 0;
 
@@ -2368,10 +2368,8 @@ static int __init blogic_init(void)
 					list_del(&myadapter->host_list);
 					scsi_host_put(host);
 					ret = -ENODEV;
-				} else {
+				} else
 					scsi_scan_host(host);
-					adapter_count++;
-				}
 			}
 		} else {
 			/*
Signature · 1 line
2.37.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Colin Ian King

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

---
  drivers/scsi/BusLogic.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

Looks good to me.

Quoted 26 lines
drivers/scsi/BusLogic.c +2 -4
index f2abffce2659..f7b7ffda1161 100644
@@ -2198,7 +2198,7 @@ static int blogic_slaveconfig(struct scsi_device *dev)
 
  static int __init blogic_init(void)
  {
-	int adapter_count = 0, drvr_optindex = 0, probeindex;
+	int drvr_optindex = 0, probeindex;
  	struct blogic_adapter *adapter;
  	int ret = 0;
 
@@ -2368,10 +2368,8 @@ static int __init blogic_init(void)
  					list_del(&myadapter->host_list);
  					scsi_host_put(host);
  					ret = -ENODEV;
-				} else {
+				} else
  					scsi_scan_host(host);
-					adapter_count++;
-				}
  			}
  		} else {
  			/*
#2 lore raw
In reply to Colin Ian King

Colin,

Quoted 3 lines

Variable adapter_count 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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering