summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-06-15 10:04:21 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 17:02:21 -0700
commitae56f3304107f70e26a389d845db76d6b949c114 (patch)
tree1d3bd840840342b65ce532ca14713380c3f95ad8
parent9114fe8ccf1871f630d2c14cd60e5f455b015459 (diff)
n_tty: Remove unused echo_overrun field
The echo_overrun field is only assigned and never tested; remove it. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/n_tty.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index a69470e02bf4..c1c721fa8766 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -96,7 +96,6 @@ struct n_tty_data {
/* must hold exclusive termios_rwsem to reset these */
unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1;
- unsigned char echo_overrun:1;
/* shared by producer and consumer */
char *read_buf;
@@ -326,7 +325,7 @@ static void reset_buffer_flags(struct n_tty_data *ldata)
ldata->read_head = ldata->canon_head = ldata->read_tail = 0;
mutex_lock(&ldata->echo_lock);
- ldata->echo_pos = ldata->echo_cnt = ldata->echo_overrun = 0;
+ ldata->echo_pos = ldata->echo_cnt = 0;
mutex_unlock(&ldata->echo_lock);
ldata->erasing = 0;
@@ -782,14 +781,11 @@ static void process_echoes(struct tty_struct *tty)
if (nr == 0) {
ldata->echo_pos = 0;
ldata->echo_cnt = 0;
- ldata->echo_overrun = 0;
} else {
int num_processed = ldata->echo_cnt - nr;
ldata->echo_pos += num_processed;
ldata->echo_pos &= N_TTY_BUF_SIZE - 1;
ldata->echo_cnt = nr;
- if (num_processed > 0)
- ldata->echo_overrun = 0;
}
mutex_unlock(&ldata->echo_lock);
@@ -835,8 +831,6 @@ static void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
ldata->echo_pos++;
}
ldata->echo_pos &= N_TTY_BUF_SIZE - 1;
-
- ldata->echo_overrun = 1;
} else {
new_byte_pos = ldata->echo_pos + ldata->echo_cnt;
new_byte_pos &= N_TTY_BUF_SIZE - 1;