Skip to contentSkip to conversation

scsi: FlashPoint: remove redundant variable bm_int_st

PATCH Applied Colin Ian King 3 participants 3 messages Jul 30, 2022 – Aug 1, 2022

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

PATCH 1/1 scsi: FlashPoint: remove redundant variable bm_int_st

The variable bm_int_st is assigned a value but it is never read. The variable and the assignment are redundant and can be removed.

Cleans up clang scan build warning:
drivers/scsi/FlashPoint.c:1726:7: warning: Although the value stored to 'bm_int_st' is used in the enclosing expression, the value is never actually read from 'bm_int_st' [deadcode.DeadStores]

---
 drivers/scsi/FlashPoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/FlashPoint.c +2 -2
index 90253208a72f..3d9c56ac8224 100644
@@ -1712,7 +1712,7 @@ static unsigned char FlashPoint_InterruptPending(void *pCurrCard)
 static int FlashPoint_HandleInterrupt(void *pcard)
 {
 	struct sccb *currSCCB;
-	unsigned char thisCard, result, bm_status, bm_int_st;
+	unsigned char thisCard, result, bm_status;
 	unsigned short hp_int;
 	unsigned char i, target;
 	struct sccb_card *pCurrCard = pcard;
@@ -1723,7 +1723,7 @@ static int FlashPoint_HandleInterrupt(void *pcard)
 
 	MDISABLE_INT(ioport);
 
-	if ((bm_int_st = RD_HARPOON(ioport + hp_int_status)) & EXT_STATUS_ON)
+	if (RD_HARPOON(ioport + hp_int_status) & EXT_STATUS_ON)
 		bm_status = RD_HARPOON(ioport + hp_ext_status) &
 					(unsigned char)BAD_EXT_STATUS;
 	else
Signature · 1 line
2.35.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Colin Ian King

The variable bm_int_st is assigned a value but it is never read. The variable and the assignment are redundant and can be removed.

Cleans up clang scan build warning:
drivers/scsi/FlashPoint.c:1726:7: warning: Although the value stored to 'bm_int_st' is used in the enclosing expression, the value is never actually read from 'bm_int_st' [deadcode.DeadStores]

Quoted 4 lines
---
  drivers/scsi/FlashPoint.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 23 lines
drivers/scsi/FlashPoint.c +2 -2
index 90253208a72f..3d9c56ac8224 100644
@@ -1712,7 +1712,7 @@ static unsigned char FlashPoint_InterruptPending(void *pCurrCard)
  static int FlashPoint_HandleInterrupt(void *pcard)
  {
  	struct sccb *currSCCB;
-	unsigned char thisCard, result, bm_status, bm_int_st;
+	unsigned char thisCard, result, bm_status;
  	unsigned short hp_int;
  	unsigned char i, target;
  	struct sccb_card *pCurrCard = pcard;
@@ -1723,7 +1723,7 @@ static int FlashPoint_HandleInterrupt(void *pcard)
 
  	MDISABLE_INT(ioport);
 
-	if ((bm_int_st = RD_HARPOON(ioport + hp_int_status)) & EXT_STATUS_ON)
+	if (RD_HARPOON(ioport + hp_int_status) & EXT_STATUS_ON)
  		bm_status = RD_HARPOON(ioport + hp_ext_status) &
  					(unsigned char)BAD_EXT_STATUS;
  	else
#2 lore raw
In reply to Colin Ian King

Colin,

Quoted 2 lines

The variable bm_int_st is assigned a value but it is never read. The variable and the assignment are redundant and can be removed.

Applied to 5.20/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering