serial: sc16is7xx: change confusing comment about Tx FIFO
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Wed, 22 Nov 2023 17:58:59 +0000 (12:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Nov 2023 07:23:16 +0000 (07:23 +0000)
The comment wording can be confusing, as txlen will return the number of
bytes available in the FIFO, which can be less than the maximum theoretical
Tx FIFO size.

Change the comment so that it is unambiguous.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20231122175859.3874753-1-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c

index 4c69c30fbac1260c70304a4756d0a2ab59d7bddc..10e90a7774f0509da0f5debc831fb70874d79198 100644 (file)
@@ -664,7 +664,7 @@ static void sc16is7xx_handle_tx(struct uart_port *port)
        /* Get length of data pending in circular buffer */
        to_send = uart_circ_chars_pending(xmit);
        if (likely(to_send)) {
-               /* Limit to size of TX FIFO */
+               /* Limit to space available in TX FIFO */
                txlen = sc16is7xx_port_read(port, SC16IS7XX_TXLVL_REG);
                if (txlen > SC16IS7XX_FIFO_SIZE) {
                        dev_err_ratelimited(port->dev,