* [PATCH] scsi: message: fusion: mptbase: remove redundant variable dmp
@ 2022-03-18 0:39 Colin Ian King
2022-04-04 18:14 ` Nick Desaulniers
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-03-18 0:39 UTC (permalink / raw)
To: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
MPT-FusionLinux.pdl, linux-scsi
Cc: kernel-janitors, linux-kernel, llvm
Variable dmp is being assigned a value that is never read, the
variable is redundant and can be removed.
Cleans up clang scan build warning:
drivers/message/fusion/mptbase.c:6667:39: warning: Although
the value stored to 'dmp' is used in the enclosing expression,
the value is never actually read from 'dmp' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/message/fusion/mptbase.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index e90adfa57950..9b3ba2df71c7 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -6658,13 +6658,13 @@ static int mpt_summary_proc_show(struct seq_file *m, void *v)
static int mpt_version_proc_show(struct seq_file *m, void *v)
{
u8 cb_idx;
- int scsi, fc, sas, lan, ctl, targ, dmp;
+ int scsi, fc, sas, lan, ctl, targ;
char *drvname;
seq_printf(m, "%s-%s\n", "mptlinux", MPT_LINUX_VERSION_COMMON);
seq_printf(m, " Fusion MPT base driver\n");
- scsi = fc = sas = lan = ctl = targ = dmp = 0;
+ scsi = fc = sas = lan = ctl = targ = 0;
for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
drvname = NULL;
if (MptCallbacks[cb_idx]) {
--
2.35.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: message: fusion: mptbase: remove redundant variable dmp
2022-03-18 0:39 [PATCH] scsi: message: fusion: mptbase: remove redundant variable dmp Colin Ian King
@ 2022-04-04 18:14 ` Nick Desaulniers
0 siblings, 0 replies; 2+ messages in thread
From: Nick Desaulniers @ 2022-04-04 18:14 UTC (permalink / raw)
To: Colin Ian King
Cc: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
MPT-FusionLinux.pdl, linux-scsi, kernel-janitors, linux-kernel,
llvm
On Thu, Mar 17, 2022 at 5:39 PM Colin Ian King <colin.i.king@gmail.com> wrote:
>
> Variable dmp is being assigned a value that is never read, the
> variable is redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/message/fusion/mptbase.c:6667:39: warning: Although
> the value stored to 'dmp' is used in the enclosing expression,
> the value is never actually read from 'dmp' [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> drivers/message/fusion/mptbase.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
> index e90adfa57950..9b3ba2df71c7 100644
> --- a/drivers/message/fusion/mptbase.c
> +++ b/drivers/message/fusion/mptbase.c
> @@ -6658,13 +6658,13 @@ static int mpt_summary_proc_show(struct seq_file *m, void *v)
> static int mpt_version_proc_show(struct seq_file *m, void *v)
> {
> u8 cb_idx;
> - int scsi, fc, sas, lan, ctl, targ, dmp;
> + int scsi, fc, sas, lan, ctl, targ;
> char *drvname;
>
> seq_printf(m, "%s-%s\n", "mptlinux", MPT_LINUX_VERSION_COMMON);
> seq_printf(m, " Fusion MPT base driver\n");
>
> - scsi = fc = sas = lan = ctl = targ = dmp = 0;
> + scsi = fc = sas = lan = ctl = targ = 0;
> for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) {
> drvname = NULL;
> if (MptCallbacks[cb_idx]) {
> --
> 2.35.1
>
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-04 21:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 0:39 [PATCH] scsi: message: fusion: mptbase: remove redundant variable dmp Colin Ian King
2022-04-04 18:14 ` Nick Desaulniers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®