* [PATCH] scsi: megaraid_mbox: remove redundant initialization of pointer mbox
@ 2021-04-20 10:49 Colin King
2021-04-27 2:54 ` Martin K. Petersen
2021-05-11 3:25 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-04-20 10:49 UTC (permalink / raw)
To: Kashyap Desai, Sumit Saxena, Shivasharan S,
James E . J . Bottomley, Martin K . Petersen, megaraidlinux.pdl,
linux-scsi
Cc: kernel-janitors, linux-kernel
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(-)
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;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: megaraid_mbox: remove redundant initialization of pointer mbox
2021-04-20 10:49 [PATCH] scsi: megaraid_mbox: remove redundant initialization of pointer mbox Colin King
@ 2021-04-27 2:54 ` Martin K. Petersen
2021-05-11 3:25 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-04-27 2:54 UTC (permalink / raw)
To: Colin King
Cc: Kashyap Desai, Sumit Saxena, Shivasharan S,
James E . J . Bottomley, Martin K . Petersen, megaraidlinux.pdl,
linux-scsi, kernel-janitors, linux-kernel
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 Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: megaraid_mbox: remove redundant initialization of pointer mbox
2021-04-20 10:49 [PATCH] scsi: megaraid_mbox: remove redundant initialization of pointer mbox Colin King
2021-04-27 2:54 ` Martin K. Petersen
@ 2021-05-11 3:25 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-05-11 3:25 UTC (permalink / raw)
To: Sumit Saxena, James E . J . Bottomley, Kashyap Desai, linux-scsi,
Shivasharan S, Colin King, megaraidlinux.pdl
Cc: Martin K . Petersen, linux-kernel, kernel-janitors
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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-11 3:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 10:49 [PATCH] scsi: megaraid_mbox: remove redundant initialization of pointer mbox Colin King
2021-04-27 2:54 ` Martin K. Petersen
2021-05-11 3:25 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).