Skip to content

Commit 8173d74

Browse files
jhovoldgregkh
authored andcommitted
serial: qcom-geni: drop flip buffer WARN()
Drop the unnecessary WARN() in case the TTY buffers are ever full in favour of a rate limited dev_err() which doesn't kill the machine when panic_on_warn is set. Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c657243 commit 8173d74

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/tty/serial/qcom_geni_serial.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,8 @@ static void handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop)
588588

589589
ret = tty_insert_flip_string(tport, port->rx_buf, bytes);
590590
if (ret != bytes) {
591-
dev_err(uport->dev, "%s:Unable to push data ret %d_bytes %d\n",
592-
__func__, ret, bytes);
593-
WARN_ON_ONCE(1);
591+
dev_err_ratelimited(uport->dev, "failed to push data (%d < %u)\n",
592+
ret, bytes);
594593
}
595594
uport->icount.rx += ret;
596595
tty_flip_buffer_push(tport);

0 commit comments

Comments
 (0)