* [PATCH] scsi: initio: remove redundant variable rb
@ 2024-01-16 11:26 Colin Ian King
2024-01-17 19:49 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-01-16 11:26 UTC (permalink / raw)
To: James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
The variable rb is being assigned a value but it isn't being
read afterwards. The assignment is redundant and so rb can be
removed.
Cleans up clang scan build warning:
warning: Although the value stored to 'rb' is used in the
enclosing expression, the value is never actually read from
'rb'[deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/scsi/initio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 2a50fda3a628..625fd547ee60 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -371,7 +371,6 @@ static u16 initio_se2_rd(unsigned long base, u8 addr)
*/
static void initio_se2_wr(unsigned long base, u8 addr, u16 val)
{
- u8 rb;
u8 instr;
int i;
@@ -400,7 +399,7 @@ static void initio_se2_wr(unsigned long base, u8 addr, u16 val)
udelay(30);
outb(SE2CS, base + TUL_NVRAM); /* -CLK */
udelay(30);
- if ((rb = inb(base + TUL_NVRAM)) & SE2DI)
+ if (inb(base + TUL_NVRAM) & SE2DI)
break; /* write complete */
}
outb(0, base + TUL_NVRAM); /* -CS */
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: initio: remove redundant variable rb
2024-01-16 11:26 [PATCH] scsi: initio: remove redundant variable rb Colin Ian King
@ 2024-01-17 19:49 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2024-01-17 19:49 UTC (permalink / raw)
To: Colin Ian King
Cc: James E . J . Bottomley, Martin K . Petersen, linux-scsi,
kernel-janitors, linux-kernel
> The variable rb is being assigned a value but it isn't being read
> afterwards. The assignment is redundant and so rb can be removed.
Applied to 6.8/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-17 19:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 11:26 [PATCH] scsi: initio: remove redundant variable rb Colin Ian King
2024-01-17 19:49 ` 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).