Commit 947d66b6 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman

n_tty: Rename tail to old_tail in n_tty_read()

The local tail variable in n_tty_read() is used for one purpose, it
keeps the old tail. Thus, rename it appropriately to improve code
readability.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/22b37499-ff9a-7fc1-f6e0-58411328d122@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 42a62da0
...@@ -2130,7 +2130,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, ...@@ -2130,7 +2130,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
ssize_t retval = 0; ssize_t retval = 0;
long timeout; long timeout;
bool packet; bool packet;
size_t tail; size_t old_tail;
/* /*
* Is this a continuation of a read started earler? * Is this a continuation of a read started earler?
...@@ -2193,7 +2193,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, ...@@ -2193,7 +2193,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
} }
packet = tty->ctrl.packet; packet = tty->ctrl.packet;
tail = ldata->read_tail; old_tail = ldata->read_tail;
add_wait_queue(&tty->read_wait, &wait); add_wait_queue(&tty->read_wait, &wait);
while (nr) { while (nr) {
...@@ -2282,7 +2282,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, ...@@ -2282,7 +2282,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
if (time) if (time)
timeout = time; timeout = time;
} }
if (tail != ldata->read_tail) if (old_tail != ldata->read_tail)
n_tty_kick_worker(tty); n_tty_kick_worker(tty);
up_read(&tty->termios_rwsem); up_read(&tty->termios_rwsem);
......
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