From: Peter Hurley Date: Mon, 13 Jul 2015 00:50:50 +0000 (-0400) Subject: tty: buffers: Move hidden buffer index advance into outer loop X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af5554f957f8a7e28b9826a9c4ad2a7dedd15a78;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tty: buffers: Move hidden buffer index advance into outer loop The advance of the 'read' buffer index belongs in the outer flip buffer consume loop, with the other buffer index arithmetic. No functional change. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 25ba5afbca13..5a3fa8913880 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -444,7 +444,6 @@ receive_buf(struct tty_struct *tty, struct tty_buffer *head, int count) if (count) disc->ops->receive_buf(tty, p, f, count); } - head->read += count; return count; } @@ -506,6 +505,7 @@ static void flush_to_ldisc(struct work_struct *work) count = receive_buf(tty, head, count); if (!count) break; + head->read += count; } mutex_unlock(&buf->lock);