* [PATCH] scsi: st: remove redundant variable pointer stp
@ 2022-08-05 11:56 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:56 UTC (permalink / raw)
To: Kai Mäkisara, James E . J . Bottomley, Martin K . Petersen,
linux-scsi
Cc: kernel-janitors, linux-kernel
Variable stp is assigned a value that is never read, the assignment
and the variable stp are redundant and can be removed.
Cleans up clang scan build warning:
drivers/scsi/st.c:4253:7: warning: Although the value stored to 'stp'
is used in the enclosing expression, the value is never actually
read from 'stp' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/scsi/st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 850172a2b8f1..65f521b036c1 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4246,11 +4246,10 @@ static int st_probe(struct device *dev)
struct st_partstat *STps;
struct st_buffer *buffer;
int i, error;
- char *stp;
if (SDp->type != TYPE_TAPE)
return -ENODEV;
- if ((stp = st_incompatible(SDp))) {
+ if (st_incompatible(SDp)) {
sdev_printk(KERN_INFO, SDp,
"OnStream tapes are no longer supported;\n");
sdev_printk(KERN_INFO, SDp,
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: st: remove redundant variable pointer stp
2022-08-05 11:56 [PATCH] scsi: st: remove redundant variable pointer stp 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: Kai Mäkisara, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
Colin,
> Variable stp is assigned a value that is never read, the assignment
> and the variable stp are redundant and can be removed.
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: st: remove redundant variable pointer stp
2022-08-05 11:56 [PATCH] scsi: st: remove redundant variable pointer stp 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: Kai Mäkisara, linux-scsi, Colin Ian King, James E . J . Bottomley
Cc: Martin K . Petersen, linux-kernel, kernel-janitors
On Fri, 5 Aug 2022 12:56:52 +0100, Colin Ian King wrote:
> Variable stp is assigned a value that is never read, the assignment
> and the variable stp are redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/scsi/st.c:4253:7: warning: Although the value stored to 'stp'
> is used in the enclosing expression, the value is never actually
> read from 'stp' [deadcode.DeadStores]
>
> [...]
Applied to 6.1/scsi-queue, thanks!
[1/1] scsi: st: remove redundant variable pointer stp
https://git.kernel.org/mkp/scsi/c/f0ee639adb78
--
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:56 [PATCH] scsi: st: remove redundant variable pointer stp 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).