* [PATCH] scsi: message: fusion: Remove redundant assignment to rc
@ 2021-05-12 10:12 Jiapeng Chong
2021-05-15 3:06 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-05-12 10:12 UTC (permalink / raw)
To: sathya.prakash
Cc: sreekanth.reddy, suganath-prabu.subramani, MPT-FusionLinux.pdl,
linux-scsi, linux-kernel, Jiapeng Chong
Variable rc is set to '-1', but this value is never read as it is
overwritten or not used later on, hence it is a redundant assignment
and can be removed.
Clean up the following clang-analyzer warning:
drivers/message/fusion/mptbase.c:6996:2: warning: Value stored to 'rc'
is never read [clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/message/fusion/mptbase.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index f4f89cf..7f7abc9 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -6993,8 +6993,6 @@ static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int
ioc->ioc_reset_in_progress = 1;
spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
- rc = -1;
-
for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
if (MptResetHandlers[cb_idx])
mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: message: fusion: Remove redundant assignment to rc
2021-05-12 10:12 [PATCH] scsi: message: fusion: Remove redundant assignment to rc Jiapeng Chong
@ 2021-05-15 3:06 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-05-15 3:06 UTC (permalink / raw)
To: Jiapeng Chong
Cc: sathya.prakash, sreekanth.reddy, suganath-prabu.subramani,
MPT-FusionLinux.pdl, linux-scsi, linux-kernel
Jiapeng,
> Variable rc is set to '-1', but this value is never read as it is
> overwritten or not used later on, hence it is a redundant assignment
> and can be removed.
Applied to 5.14/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-15 3:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-12 10:12 [PATCH] scsi: message: fusion: Remove redundant assignment to rc Jiapeng Chong
2021-05-15 3:06 ` 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