Skip to contentSkip to conversation

scsi: megaraid_mbox: remove redundant initialization of pointer mbox

PATCH Applied Colin King 2 participants 3 messages Apr 20, 2021 – May 11, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 scsi: megaraid_mbox: remove redundant initialization of pointer mbox

From: Colin Ian King <[email protected]>

The pointer mbox is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/scsi/megaraid/megaraid_mbox.c | 2 --
 1 file changed, 2 deletions(-)
drivers/scsi/megaraid/megaraid_mbox.c +0 -2
index 145fde302d7d..d0aa384adb76 100644
@@ -3240,8 +3240,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter)
 	int i;
 	uint32_t dword;
 
-	mbox = (mbox_t *)raw_mbox;
-
 	memset((caddr_t)raw_mbox, 0, sizeof(mbox_t));
 
 	raw_mbox[0] = 0xFF;
Signature · 1 line
2.30.2
#1 lore raw

Colin,

Quoted 3 lines

The pointer mbox is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
In reply to Colin King
Quoted 3 lines · Colin King

The pointer mbox is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Applied to 5.14/scsi-queue, thanks!

[1/1] scsi: megaraid_mbox: remove redundant initialization of pointer mbox

      https://git.kernel.org/mkp/scsi/c/807b31d8e0fc
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering