Skip to contentSkip to conversation

tty/isicom: remove redundant assignment to variable word_count

PATCH In review Colin King 2 participants 2 messages Jul 23, 2019 – Jul 24, 2019

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 tty/isicom: remove redundant assignment to variable word_count

From: Colin Ian King <[email protected]>

The variable word_count is being assigned a value that is never read before a return, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/tty/isicom.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/isicom.c +0 -1
index e04a43e89f6b..fc38f96475bf 100644
@@ -553,7 +553,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
 
 	tty = tty_port_tty_get(&port->port);
 	if (tty = NULL) {
-		word_count = byte_count >> 1;
 		while (byte_count > 1) {
 			inw(base);
 			byte_count -= 2;
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Colin King

From: Colin Ian King <[email protected]>

The variable word_count is being assigned a value that is never read before a return, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Looks good, it predates git. Maybe the while loop wanted to use word_count originally.

Quoted 17 lines
---
 drivers/tty/isicom.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/isicom.c +0 -1
index e04a43e89f6b..fc38f96475bf 100644
@@ -553,7 +553,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
 
 	tty = tty_port_tty_get(&port->port);
 	if (tty = NULL) {
-		word_count = byte_count >> 1;
 		while (byte_count > 1) {
 			inw(base);
 			byte_count -= 2;
Signature · 2 lines
js
suse labs