Skip to contentSkip to conversation

scsi: qla1280: remove redundant assignment to variable mr

PATCH Applied Colin Ian King 2 participants 2 messages Feb 15, 2024

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

PATCH 1/1 scsi: qla1280: remove redundant assignment to variable mr

The variable mr being assigned a value that is never read, the assignment is redundant and can be removed.

Cleans up clang scan build warning:

drivers/scsi/qla1280.c:2481:2: warning: Value stored to 'mr' is never read [deadcode.DeadStores]

---
 drivers/scsi/qla1280.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/qla1280.c +0 -1
index 27bce80262c2..8958547ac111 100644
@@ -2478,7 +2478,6 @@ qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb)
 	/* Load return mailbox registers. */
 	optr = mb;
 	iptr = (uint16_t *) &ha->mailbox_out[0];
-	mr = MAILBOX_REGISTER_COUNT;
 	memcpy(optr, iptr, MAILBOX_REGISTER_COUNT * sizeof(uint16_t));
 
 	if (ha->flags.reset_marker)
Signature · 1 line
2.39.2
#1 lore raw

Colin,

Quoted 2 lines

The variable mr being assigned a value that is never read, the assignment is redundant and can be removed.

Applied to 6.9/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering