Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <jirislaby@kernel.org>
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220730130925.150018-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Colin Ian King and committed by
Greg Kroah-Hartman
e4cdd25c 74b2c563

+1 -1
+1 -1
drivers/tty/mxser.c
··· 398 398 oldmcr = inb(io + UART_MCR); 399 399 outb(0, io + UART_MCR); 400 400 mxser_set_must_xon1_value(io, 0x11); 401 - if ((hwid = inb(io + UART_MCR)) != 0) { 401 + if (inb(io + UART_MCR) != 0) { 402 402 outb(oldmcr, io + UART_MCR); 403 403 return MOXA_OTHER_UART; 404 404 }