Skip to contentSkip to conversation

tty: jsm: Remove redundant assignment to variable linestatus

PATCH New Colin Ian King 1 participant 1 message Feb 16, 2024

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

PATCH 1/1 tty: jsm: Remove redundant assignment to variable linestatus

The variable linestate being assigned a value that is never read, the following continue statement jumps to the end of the while-loop and then it is re-assigned a new value. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/tty/serial/jsm/jsm_cls.c:398:4: warning: Value stored to 'linestatus' is never read [deadcode.DeadStores]

---
 drivers/tty/serial/jsm/jsm_cls.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/serial/jsm/jsm_cls.c +0 -1
index 1eda48964c0b..ddbd42c09637 100644
@@ -395,7 +395,6 @@ static void cls_copy_data_from_uart_to_queue(struct jsm_channel *ch)
 		 * which in this case is the break signal.
 		 */
 		if (linestatus & error_mask)  {
-			linestatus = 0;
 			readb(&ch->ch_cls_uart->txrx);
 			continue;
 		}
Signature · 1 line
2.39.2