Skip to contentSkip to conversation

scsi: initio: remove redundant variable rb

PATCH Applied Colin Ian King 2 participants 2 messages Jan 16, 2024 – Jan 17, 2024

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

PATCH 1/1 scsi: initio: remove redundant variable rb

The variable rb is being assigned a value but it isn't being read afterwards. The assignment is redundant and so rb can be removed.

Cleans up clang scan build warning:
warning: Although the value stored to 'rb' is used in the enclosing expression, the value is never actually read from 'rb'[deadcode.DeadStores]

---
 drivers/scsi/initio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/initio.c +1 -2
index 2a50fda3a628..625fd547ee60 100644
@@ -371,7 +371,6 @@ static u16 initio_se2_rd(unsigned long base, u8 addr)
  */
 static void initio_se2_wr(unsigned long base, u8 addr, u16 val)
 {
-	u8 rb;
 	u8 instr;
 	int i;
 
@@ -400,7 +399,7 @@ static void initio_se2_wr(unsigned long base, u8 addr, u16 val)
 		udelay(30);
 		outb(SE2CS, base + TUL_NVRAM);			/* -CLK */
 		udelay(30);
-		if ((rb = inb(base + TUL_NVRAM)) & SE2DI)
+		if (inb(base + TUL_NVRAM) & SE2DI)
 			break;	/* write complete */
 	}
 	outb(0, base + TUL_NVRAM);				/* -CS */
Signature · 1 line
2.39.2
#1 lore raw
Quoted 3 lines

The variable rb is being assigned a value but it isn't being read afterwards. The assignment is redundant and so rb can be removed.

Applied to 6.8/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering