提交 6804396f 编写于 作者: J Jiri Slaby 提交者: Linus Torvalds

Char: tty_ioctl, little whitespace cleanup

tty_ioctl, little whitespace cleanup

the point is to make
while (++i < n_baud_table);
clear and assign it to the do { } loop
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5a52bd4a
...@@ -261,13 +261,12 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed ...@@ -261,13 +261,12 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed
termios->c_cflag |= (baud_bits[i] << IBSHIFT); termios->c_cflag |= (baud_bits[i] << IBSHIFT);
ifound = i; ifound = i;
} }
} } while (++i < n_baud_table);
while(++i < n_baud_table);
if (ofound == -1) if (ofound == -1)
termios->c_cflag |= BOTHER; termios->c_cflag |= BOTHER;
/* Set exact input bits only if the input and output differ or the /* Set exact input bits only if the input and output differ or the
user already did */ user already did */
if (ifound == -1 && (ibaud != obaud || ibinput)) if (ifound == -1 && (ibaud != obaud || ibinput))
termios->c_cflag |= (BOTHER << IBSHIFT); termios->c_cflag |= (BOTHER << IBSHIFT);
} }
...@@ -560,7 +559,7 @@ static int set_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb) ...@@ -560,7 +559,7 @@ static int set_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb)
return -EFAULT; return -EFAULT;
mutex_lock(&tty->termios_mutex); mutex_lock(&tty->termios_mutex);
termios = *tty->termios; termios = *tty->termios;
termios.c_cc[VERASE] = tmp.sg_erase; termios.c_cc[VERASE] = tmp.sg_erase;
termios.c_cc[VKILL] = tmp.sg_kill; termios.c_cc[VKILL] = tmp.sg_kill;
set_sgflags(&termios, tmp.sg_flags); set_sgflags(&termios, tmp.sg_flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册