tty: mxser: convert to u8 and size_t
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 6 Dec 2023 07:37:03 +0000 (08:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 11:02:38 +0000 (12:02 +0100)
Switch character types to u8 and sizes to size_t. To conform to
characters/sizes in the rest of the tty layer.

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

index 6ce7f259968fa40fe835c2fa6996bfd8016d335b..458bb1280ebf9d4d04e7fc291898b84e01cdd7e5 100644 (file)
@@ -264,7 +264,7 @@ struct mxser_port {
        u8 rx_low_water;
        int type;               /* UART type */
 
-       unsigned char x_char;   /* xon/xoff character */
+       u8 x_char;              /* xon/xoff character */
        u8 IER;                 /* Interrupt Enable Register */
        u8 MCR;                 /* Modem control register */
        u8 FCR;                 /* FIFO control register */
@@ -905,7 +905,7 @@ static ssize_t mxser_write(struct tty_struct *tty, const u8 *buf, size_t count)
 {
        struct mxser_port *info = tty->driver_data;
        unsigned long flags;
-       int written;
+       size_t written;
        bool is_empty;
 
        spin_lock_irqsave(&info->slock, flags);
@@ -1521,7 +1521,7 @@ static u8 mxser_receive_chars_old(struct tty_struct *tty,
                        if (++ignored > 100)
                                break;
                } else {
-                       char flag = 0;
+                       u8 flag = 0;
                        if (status & UART_LSR_BRK_ERROR_BITS) {
                                if (status & UART_LSR_BI) {
                                        flag = TTY_BREAK;
@@ -1585,7 +1585,7 @@ static void mxser_transmit_chars(struct tty_struct *tty, struct mxser_port *port
 
        count = port->xmit_fifo_size;
        do {
-               unsigned char c;
+               u8 c;
 
                if (!kfifo_get(&port->port.xmit_fifo, &c))
                        break;