* [PATCH] scsi: megaraid: remove redundant assignment to variable mfiStatus
@ 2022-08-05 11:50 Colin Ian King
2022-08-23 3:44 ` Martin K. Petersen
2022-09-01 5:12 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-08-05 11:50 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
The variable mfiStatus is assigned a value but it is never read. The
assignment is redundant and can be removed. Also remove { } as the
return statement does not need to be in it's own code block.
Cleans up clang scan build warning:
drivers/scsi/megaraid/megaraid_sas_base.c:4026:7: warning: Although the
value stored to 'mfiStatus' is used in the enclosing expression, the
value is never actually read from 'mfiStatus' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index a3e117a4b8e7..c9b01b155f65 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4023,10 +4023,8 @@ megasas_deplete_reply_queue(struct megasas_instance *instance,
u32 mfiStatus;
u32 fw_state;
- if ((mfiStatus = instance->instancet->check_reset(instance,
- instance->reg_set)) == 1) {
+ if (instance->instancet->check_reset(instance, instance->reg_set) == 1)
return IRQ_HANDLED;
- }
mfiStatus = instance->instancet->clear_intr(instance);
if (mfiStatus == 0) {
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: megaraid: remove redundant assignment to variable mfiStatus
2022-08-05 11:50 [PATCH] scsi: megaraid: remove redundant assignment to variable mfiStatus Colin Ian King
@ 2022-08-23 3:44 ` Martin K. Petersen
2022-09-01 5:12 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-08-23 3:44 UTC (permalink / raw)
To: Colin Ian 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 variable mfiStatus is assigned a value but it is never read. The
> assignment is redundant and can be removed. Also remove { } as the
> return statement does not need to be in it's own code block.
Applied to 6.1/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: megaraid: remove redundant assignment to variable mfiStatus
2022-08-05 11:50 [PATCH] scsi: megaraid: remove redundant assignment to variable mfiStatus Colin Ian King
2022-08-23 3:44 ` Martin K. Petersen
@ 2022-09-01 5:12 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-09-01 5:12 UTC (permalink / raw)
To: linux-scsi, Colin Ian King, megaraidlinux.pdl,
James E . J . Bottomley, Kashyap Desai, Sumit Saxena,
Shivasharan S
Cc: Martin K . Petersen, linux-kernel, kernel-janitors
On Fri, 5 Aug 2022 12:50:42 +0100, Colin Ian King wrote:
> The variable mfiStatus is assigned a value but it is never read. The
> assignment is redundant and can be removed. Also remove { } as the
> return statement does not need to be in it's own code block.
>
> Cleans up clang scan build warning:
> drivers/scsi/megaraid/megaraid_sas_base.c:4026:7: warning: Although the
> value stored to 'mfiStatus' is used in the enclosing expression, the
> value is never actually read from 'mfiStatus' [deadcode.DeadStores]
>
> [...]
Applied to 6.1/scsi-queue, thanks!
[1/1] scsi: megaraid: remove redundant assignment to variable mfiStatus
https://git.kernel.org/mkp/scsi/c/4e62671a9a49
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-01 5:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 11:50 [PATCH] scsi: megaraid: remove redundant assignment to variable mfiStatus Colin Ian King
2022-08-23 3:44 ` Martin K. Petersen
2022-09-01 5:12 ` 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).