From: Greg Kroah-Hartman Date: Tue, 15 May 2012 16:44:22 +0000 (-0700) Subject: Revert "serial_core: Update buffer overrun statistics." X-Git-Tag: upstream/snapshot3+hdmi~7440^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55e4b8b416849753bd7eacd1f2ac3947fcf1c78e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Revert "serial_core: Update buffer overrun statistics." This reverts commit 642180871bc91afebb6ccf40d1615a7dd33699a3. Buffer overruns are for hardware reported overruns, not software ones, which will only happen if we run out of memory and you will get lots of -ENOMEM errors at the same time. Thanks to Alan Cox for catching this. Reported-by: Alan Cox Cc: Corbin Atkinson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index a21dc8e..246b823 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2527,16 +2527,14 @@ void uart_insert_char(struct uart_port *port, unsigned int status, struct tty_struct *tty = port->state->port.tty; if ((status & port->ignore_status_mask & ~overrun) == 0) - if (tty_insert_flip_char(tty, ch, flag) == 0) - ++port->icount.buf_overrun; + tty_insert_flip_char(tty, ch, flag); /* * Overrun is special. Since it's reported immediately, * it doesn't affect the current character. */ if (status & ~port->ignore_status_mask & overrun) - if (tty_insert_flip_char(tty, 0, TTY_OVERRUN) == 0) - ++port->icount.buf_overrun; + tty_insert_flip_char(tty, 0, TTY_OVERRUN); } EXPORT_SYMBOL_GPL(uart_insert_char);