lkml.org 
[lkml]   [2022]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/7] serial: pch: remove debug print from pop_tx
Date
It makes the code overly complicated for no good reason.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/serial/pch_uart.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 4fcb6c144b54..a90bdff60908 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -764,7 +764,7 @@ static bool pop_tx(struct eg20t_port *priv, unsigned int size)
struct circ_buf *xmit = &port->state->xmit;

if (uart_tx_stopped(port))
- goto pop_tx_end;
+ return false;

while (!uart_circ_empty(xmit) && count < size) {
iowrite8(xmit->buf[xmit->tail], priv->membase + PCH_UART_THR);
@@ -773,10 +773,6 @@ static bool pop_tx(struct eg20t_port *priv, unsigned int size)
count++;
}

-pop_tx_end:
- dev_dbg(priv->port.dev, "%d characters. Remained %d characters.(%lu)\n",
- count, size - count, jiffies);
-
return count;
}

--
2.36.0
\
 
 \ /
  Last update: 2022-05-03 10:09    [W:0.059 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site