tty: switch tty_port::xmit_* to u8
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 6 Dec 2023 07:36:48 +0000 (08:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 11:02:37 +0000 (12:02 +0100)
Both xmit_buf and xmit_fifo of struct tty_port should be u8. To conform
to characters in the rest of the tty layer.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20231206073712.17776-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_port.c
include/linux/tty_port.h

index ef72d2e4b928de8a9cd3f7c5d00d07d3f81069d5..14cca33d226930f56ecbcce0d8ad8e90df8eee4f 100644 (file)
@@ -247,7 +247,7 @@ int tty_port_alloc_xmit_buf(struct tty_port *port)
        /* We may sleep in get_zeroed_page() */
        mutex_lock(&port->buf_mutex);
        if (port->xmit_buf == NULL) {
-               port->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL);
+               port->xmit_buf = (u8 *)get_zeroed_page(GFP_KERNEL);
                if (port->xmit_buf)
                        kfifo_init(&port->xmit_fifo, port->xmit_buf, PAGE_SIZE);
        }
index 3276311a7f384709ad54f444dd9595f59e998da6..1b861f2100b69f120971c7dd503d6635db1fb468 100644 (file)
@@ -114,8 +114,8 @@ struct tty_port {
        unsigned char           console:1;
        struct mutex            mutex;
        struct mutex            buf_mutex;
-       unsigned char           *xmit_buf;
-       DECLARE_KFIFO_PTR(xmit_fifo, unsigned char);
+       u8                      *xmit_buf;
+       DECLARE_KFIFO_PTR(xmit_fifo, u8);
        unsigned int            close_delay;
        unsigned int            closing_wait;
        int                     drain_delay;