scsi: megaraid: remove redundant assignment to variable mfiStatus
Subsystems (3)
PATCH 1/1 scsi: megaraid: remove redundant assignment to variable mfiStatus
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]
--- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +1 -3
@@ -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 ) {
Signature · 1 line
2.35.3
Martin K. Petersen
AppliedColin,
Quoted 3 lines
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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 10 lines · Colin Ian King
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
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering