[PATCH v1 1/3] serial: core: Don't count XON/XOFF in the statistics

Andy Shevchenko
2024-04-03T14:47:35Z

Don't count XON/XOFF in the statistics in __uart_port_tx().
It will make it in align with other serial drivers. With
this change we may use uart_xmit_advance() API instead of
open coded analogue.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/serial_core.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 0a0f6e21d40e..9579d70a367e 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -767,7 +767,7 @@ enum UART_TX_FLAGS {
struct circ_buf *xmit = &__port->state->xmit; \
unsigned int pending; \
\
- for (; (for_test) && (tx_ready); (for_post), __port->icount.tx++) { \
+ for (; (for_test) && (tx_ready); (for_post)) { \
if (__port->x_char) { \
(ch) = __port->x_char; \
(put_char); \
@@ -780,7 +780,7 @@ enum UART_TX_FLAGS {
\
(ch) = xmit->buf[xmit->tail]; \
(put_char); \
- xmit->tail = (xmit->tail + 1) % UART_XMIT_SIZE; \
+ uart_xmit_advance(__port, 1); \
} \
\
(tx_done); \
--
2.43.0.rc1.1.gbec44491f096