Skip to contentSkip to conversation

gs: missing parentheses

PATCH In review Roel Kluin 2 participants 2 messages May 14, 2009 Char and misc drivers

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 gs: missing parentheses

|' has a higher precedence than ?' so add parentheses.

---

drivers/char/sx.c +2 -2
index 518f2a2..1f63add 100644
@@ -979,8 +979,8 @@ static int sx_set_real_termios(void *ptr)
 			(I_IXANY(port->gs.port.tty) ? SP_TANY : 0) | SP_DCEN);
 
 	sx_write_channel_byte(port, hi_break,
-			(I_IGNBRK(port->gs.port.tty) ? BR_IGN : 0 |
-			I_BRKINT(port->gs.port.tty) ? BR_INT : 0));
+			(I_IGNBRK(port->gs.port.tty) ? BR_IGN : 0) |
+			(I_BRKINT(port->gs.port.tty) ? BR_INT : 0));
 
 	sx_write_channel_byte(port, hi_txon, START_CHAR(port->gs.port.tty));
 	sx_write_channel_byte(port, hi_rxon, START_CHAR(port->gs.port.tty));
#1 lore raw
Quoted 9 lines · Roel Kluin

|' has a higher precedence than ?' so add parentheses.

---

drivers/char/sx.c +0 -0
index 518f2a2..1f63add 100644

drivers/char/sx.c static int sx_set_real_termios(void *ptr) · line 982

Quoted 6 lines
drivers/char/sx.c +0 -2
@@ -979,8 +979,8 @@ static int sx_set_real_termios(void *ptr)
 			(I_IXANY(port->gs.port.tty) ? SP_TANY : 0) | SP_DCEN);
 
 	sx_write_channel_byte(port, hi_break,
-			(I_IGNBRK(port->gs.port.tty) ? BR_IGN : 0 |
-			I_BRKINT(port->gs.port.tty) ? BR_INT : 0));
 

This looks correct to me.

drivers/char/sx.c static int sx_set_real_termios(void *ptr) · line 984

Quoted 3 lines
drivers/char/sx.c +2 -0
+			(I_IGNBRK(port->gs.port.tty) ? BR_IGN : 0) |
+			(I_BRKINT(port->gs.port.tty) ? BR_INT : 0));
 

It may not want Interrupt and Ignore both at the same time on received breaks.

Quoted 14 lines
drivers/char/sx.c +0 -0
 	sx_write_channel_byte(port, hi_txon, START_CHAR(port->gs.port.tty));

sx_write_channel_byte(port, hi_rxon, START_CHAR(port->gs.port.tty));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Email Scanned for Virus & Dangerous Content by : www.CleanMailGateway.com