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

serial: omap: remove redundant assignment to variable tmout

Variable tmout is being assigned a value that is never read, it is
being re-assinged in the following for-loop statement. The assignment
is redundant and can be removed.

Cleans up clang scan warning:
drivers/tty/serial/omap-serial.c:1096:3: warning: Value stored to 'tmout'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240411085537.306020-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
46f2bba8 4547cd76

-1
-1
drivers/tty/serial/omap-serial.c
··· 1093 1093 1094 1094 /* Wait up to 1s for flow control if necessary */ 1095 1095 if (up->port.flags & UPF_CONS_FLOW) { 1096 - tmout = 1000000; 1097 1096 for (tmout = 1000000; tmout; tmout--) { 1098 1097 unsigned int msr = serial_in(up, UART_MSR); 1099 1098