diff mbox series

scsi: megaraid_mbox: remove redundant initialization of pointer mbox

Message ID 20210420104919.376734-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show
Series scsi: megaraid_mbox: remove redundant initialization of pointer mbox | expand

Commit Message

Colin King April 20, 2021, 10:49 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/megaraid/megaraid_mbox.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Martin K. Petersen April 27, 2021, 2:54 a.m. UTC | #1
Colin,

> 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!
Martin K. Petersen May 11, 2021, 3:25 a.m. UTC | #2
On Tue, 20 Apr 2021 11:49:19 +0100, Colin King wrote:

> 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
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 145fde302d7d..d0aa384adb76 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -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;