Commit be54478d authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] 2.5.8-pre3 set_bit cleanup III

This removes gratuitous & operators in front of tty->process_char_map
and tty->read_flags.

No object code changes
parent de331827
......@@ -538,7 +538,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
* handle specially, do shortcut processing to speed things
* up.
*/
if (!test_bit(c, &tty->process_char_map) || tty->lnext) {
if (!test_bit(c, tty->process_char_map) || tty->lnext) {
finish_erasing(tty);
tty->lnext = 0;
if (L_ECHO(tty)) {
......@@ -659,7 +659,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
handle_newline:
spin_lock_irqsave(&tty->read_lock, flags);
set_bit(tty->read_head, &tty->read_flags);
set_bit(tty->read_head, tty->read_flags);
put_tty_queue_nolock(c, tty);
tty->canon_head = tty->read_head;
tty->canon_data++;
......@@ -811,38 +811,38 @@ static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
memset(tty->process_char_map, 0, 256/8);
if (I_IGNCR(tty) || I_ICRNL(tty))
set_bit('\r', &tty->process_char_map);
set_bit('\r', tty->process_char_map);
if (I_INLCR(tty))
set_bit('\n', &tty->process_char_map);
set_bit('\n', tty->process_char_map);
if (L_ICANON(tty)) {
set_bit(ERASE_CHAR(tty), &tty->process_char_map);
set_bit(KILL_CHAR(tty), &tty->process_char_map);
set_bit(EOF_CHAR(tty), &tty->process_char_map);
set_bit('\n', &tty->process_char_map);
set_bit(EOL_CHAR(tty), &tty->process_char_map);
set_bit(ERASE_CHAR(tty), tty->process_char_map);
set_bit(KILL_CHAR(tty), tty->process_char_map);
set_bit(EOF_CHAR(tty), tty->process_char_map);
set_bit('\n', tty->process_char_map);
set_bit(EOL_CHAR(tty), tty->process_char_map);
if (L_IEXTEN(tty)) {
set_bit(WERASE_CHAR(tty),
&tty->process_char_map);
tty->process_char_map);
set_bit(LNEXT_CHAR(tty),
&tty->process_char_map);
tty->process_char_map);
set_bit(EOL2_CHAR(tty),
&tty->process_char_map);
tty->process_char_map);
if (L_ECHO(tty))
set_bit(REPRINT_CHAR(tty),
&tty->process_char_map);
tty->process_char_map);
}
}
if (I_IXON(tty)) {
set_bit(START_CHAR(tty), &tty->process_char_map);
set_bit(STOP_CHAR(tty), &tty->process_char_map);
set_bit(START_CHAR(tty), tty->process_char_map);
set_bit(STOP_CHAR(tty), tty->process_char_map);
}
if (L_ISIG(tty)) {
set_bit(INTR_CHAR(tty), &tty->process_char_map);
set_bit(QUIT_CHAR(tty), &tty->process_char_map);
set_bit(SUSP_CHAR(tty), &tty->process_char_map);
set_bit(INTR_CHAR(tty), tty->process_char_map);
set_bit(QUIT_CHAR(tty), tty->process_char_map);
set_bit(SUSP_CHAR(tty), tty->process_char_map);
}
clear_bit(__DISABLED_CHAR, &tty->process_char_map);
clear_bit(__DISABLED_CHAR, tty->process_char_map);
sti();
tty->raw = 0;
tty->real_raw = 0;
......@@ -1058,7 +1058,7 @@ static ssize_t read_chan(struct tty_struct *tty, struct file *file,
int eol;
eol = test_and_clear_bit(tty->read_tail,
&tty->read_flags);
tty->read_flags);
c = tty->read_buf[tty->read_tail];
spin_lock_irqsave(&tty->read_lock, flags);
tty->read_tail = ((tty->read_tail+1) &
......
......@@ -188,7 +188,7 @@ static unsigned long inq_canon(struct tty_struct * tty)
nr = (head - tail) & (N_TTY_BUF_SIZE-1);
/* Skip EOF-chars.. */
while (head != tail) {
if (test_bit(tail, &tty->read_flags) &&
if (test_bit(tail, tty->read_flags) &&
tty->read_buf[tail] == __DISABLED_CHAR)
nr--;
tail = (tail+1) & (N_TTY_BUF_SIZE-1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment