Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: liteuart: move tty_flip_buffer_push() out of rx loop

Calling tty_flip_buffer_push() for each individual received character
is overkill. Move it out of the rx loop, and only call it once per
set of characters received together.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20221123130500.1030189-7-gsomlo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Gabriel Somlo and committed by
Greg Kroah-Hartman
2ee91d42 b9f5a18a

+2 -2
+2 -2
drivers/tty/serial/liteuart.c
··· 87 87 /* no overflow bits in status */ 88 88 if (!(uart_handle_sysrq_char(port, ch))) 89 89 uart_insert_char(port, status, 0, ch, flg); 90 - 91 - tty_flip_buffer_push(&port->state->port); 92 90 } 91 + 92 + tty_flip_buffer_push(&port->state->port); 93 93 94 94 mod_timer(&uart->timer, jiffies + uart_poll_timeout(port)); 95 95 }