Skip to contentSkip to conversation

serial: omap: remove redundant assignment to variable tmout

PATCH New Colin Ian King 1 participant 1 message Apr 11, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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]

---
 drivers/tty/serial/omap-serial.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/serial/omap-serial.c +0 -1
index 9be1c871cf11..d7e172eeaab1 100644
@@ -1093,7 +1093,6 @@ static void __maybe_unused wait_for_xmitr(struct uart_omap_port *up)
 
 	/* Wait up to 1s for flow control if necessary */
 	if (up->port.flags & UPF_CONS_FLOW) {
-		tmout = 1000000;
 		for (tmout = 1000000; tmout; tmout--) {
 			unsigned int msr = serial_in(up, UART_MSR);
 
Signature · 1 line
2.39.2