From e4cdd25cafac3f61c74c146db5de7a5c9bd7b6d0 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Sat, 30 Jul 2022 14:09:25 +0100 Subject: [PATCH] tty: mxser: remove redundant assignment to hwid The variable hwid is assigned a value but it is never read. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/tty/mxser.c:401:7: warning: Although the value stored to 'hwid' is used in the enclosing expression, the value is never actually read from 'hwid' [deadcode.DeadStores] Acked-by: Jiri Slaby Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220730130925.150018-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/mxser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 3413bd77beed..2436e0b10f9a 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -398,7 +398,7 @@ static enum mxser_must_hwid mxser_must_get_hwid(unsigned long io) oldmcr = inb(io + UART_MCR); outb(0, io + UART_MCR); mxser_set_must_xon1_value(io, 0x11); - if ((hwid = inb(io + UART_MCR)) != 0) { + if (inb(io + UART_MCR) != 0) { outb(oldmcr, io + UART_MCR); return MOXA_OTHER_UART; }