summaryrefslogtreecommitdiff
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-11-11 17:25:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-22 19:51:34 +0300
commit947d66b68f3c4e7cf8f3f3500807b9d2a0de28ce (patch)
treefb5002a963428d28226ccec352060574cb59ad8d /drivers/tty/n_tty.c
parent42a62da0ae660e71c280bd8b287b994c1af1352c (diff)
downloadlinux-947d66b68f3c4e7cf8f3f3500807b9d2a0de28ce.tar.xz
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: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/22b37499-ff9a-7fc1-f6e0-58411328d122@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 597019690ae6..c8f56c9b1a1c 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2130,7 +2130,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
ssize_t retval = 0;
long timeout;
bool packet;
- size_t tail;
+ size_t old_tail;
/*
* 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,
}
packet = tty->ctrl.packet;
- tail = ldata->read_tail;
+ old_tail = ldata->read_tail;
add_wait_queue(&tty->read_wait, &wait);
while (nr) {
@@ -2282,7 +2282,7 @@ more_to_be_read:
if (time)
timeout = time;
}
- if (tail != ldata->read_tail)
+ if (old_tail != ldata->read_tail)
n_tty_kick_worker(tty);
up_read(&tty->termios_rwsem);