Skip to contentSkip to conversation

scsi: acornscsi: resolve set-but-not-used variable warning

PATCH New Ethan Nelson-Moore 1 participant 1 message Jun 8

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

PATCH 1/1 scsi: acornscsi: resolve set-but-not-used variable warning

The variable "p" in the acornscsi_info() function is set but not used, which causes a warning with W=1 builds. Remove it to resolve this issue.

---
 drivers/scsi/arm/acornscsi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/arm/acornscsi.c +2 -4
index 79d7d7336b6a..ebf09b787dfd 100644
@@ -2681,11 +2681,9 @@ static int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
  */
 static const char *acornscsi_info(struct Scsi_Host *host)
 {
-    static char string[100], *p;
+    static char string[100];
 
-    p = string;
-    
-    p += sprintf(string, "%s at port %08lX irq %d v%d.%d.%d"
+    sprintf(string, "%s at port %08lX irq %d v%d.%d.%d"
 #ifdef CONFIG_SCSI_ACORNSCSI_SYNC
     " SYNC"
 #endif
Signature · 1 line
2.43.0