misc N_TTY termios fixes
PATCH 1/3 n_tty: Remove superfluous reader wakeup
In reply to Peter Hurleyn_tty's .set_termios method unconditionally performs reader wakeup; remove extra reader wakeup for canonical mode changes.
Signed-off-by Peter Hurley <[email protected]>
--- drivers/tty/n_tty.c | 3 --- 1 file changed, 3 deletions(-)
drivers/tty/n_tty.c +0 -3
@@ -1763,9 +1763,6 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) ldata->lnext =0 ; } -if (canon_change && !L_ICANON (tty) &&read_cnt (ldata)) -wake_up_interruptible (&tty->read_wait); - ldata->icanon = (L_ICANON (tty) !=0 ); if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) ||
Signature · 1 line
1.8.1.2
PATCH 2/3 n_tty: Remove unnecessary local variable
In reply to Peter HurleyFlatten conditional evaluation in n_tty_set_termios; remove canon_change.
Signed-off-by Peter Hurley <[email protected]>
--- drivers/tty/n_tty.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/tty/n_tty.c +1 -4
@@ -1752,11 +1752,8 @@ int is_ignored(int sig)static void n_tty_set_termios (struct tty_struct *tty,struct ktermios *old) {struct n_tty_data *ldata = tty->disc_data; -int canon_change =1 ; -if (old) - canon_change = (old->c_lflag ^ tty->termios.c_lflag) &ICANON ; -if (canon_change) { +if (!old || (old->c_lflag ^ tty->termios.c_lflag) &ICANON ) {bitmap_zero (ldata->read_flags,N_TTY_BUF_SIZE ); ldata->line_start = ldata->canon_head = ldata->read_tail; ldata->erasing =0 ;
Signature · 1 line
1.8.1.2
PATCH 3/3 n_tty: Style fix in n_tty_set_termios
In reply to Peter HurleyRemove braces from single-statement conditional in n_tty_set_termios.
Signed-off-by Peter Hurley <[email protected]>
--- drivers/tty/n_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/n_tty.c +1 -2
@@ -1814,9 +1814,8 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)* Fix tty hang when I_IXON(tty) is cleared, but the tty * been stopped by STOP_CHAR(tty) before it. */ -if (!I_IXON (tty) && old && (old->c_iflag &IXON ) && !tty->flow_stopped) { +if (!I_IXON (tty) && old && (old->c_iflag &IXON ) && !tty->flow_stopped)start_tty (tty); - }/* The termios change make the tty ready for I/O */ wake_up_interruptible (&tty->write_wait);
Signature · 1 line
1.8.1.2
cover misc N_TTY termios fixes
Hi Greg,
These 3 patches correct non-critical issues in n_tty_set_termios(). Please apply for linux-next.
Thanks,
Peter Hurley (3):
n_tty: Remove superfluous reader wakeup
n_tty: Remove unnecessary local variable
n_tty: Style fix in n_tty_set_termios
drivers/tty/n_tty.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.1.2