tty: make tty_operations::send_xchar accept u8 char
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 6 Dec 2023 07:36:49 +0000 (08:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 11:02:37 +0000 (12:02 +0100)
tty_operations::send_xchar is one of the last users of 'char' type for
characters in the tty layer. Convert it to u8 now.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-bluetooth@vger.kernel.org
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20231206073712.17776-5-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/isdn/capi/capi.c
drivers/mmc/core/sdio_uart.c
drivers/tty/amiserial.c
drivers/tty/serial/serial_core.c
drivers/tty/tty_io.c
include/linux/tty.h
include/linux/tty_driver.h
net/bluetooth/rfcomm/tty.c

index 2f37895154455e9ff806a294f2336fc83bdd43a5..6e80d7bd3c4dc51f1467fd94640596b1a04c8b01 100644 (file)
@@ -1231,9 +1231,9 @@ static void capinc_tty_hangup(struct tty_struct *tty)
        tty_port_hangup(&mp->port);
 }
 
-static void capinc_tty_send_xchar(struct tty_struct *tty, char ch)
+static void capinc_tty_send_xchar(struct tty_struct *tty, u8 ch)
 {
-       pr_debug("capinc_tty_send_xchar(%d)\n", ch);
+       pr_debug("capinc_tty_send_xchar(%u)\n", ch);
 }
 
 static const struct tty_operations capinc_ops = {
index a05322f157718e3337d1363f43a3677ef34c3ba4..370fadf1d6d1c04ca3b0e8944bc42fe31ffc4d7e 100644 (file)
@@ -792,7 +792,7 @@ static unsigned int sdio_uart_chars_in_buffer(struct tty_struct *tty)
        return kfifo_len(&port->xmit_fifo);
 }
 
-static void sdio_uart_send_xchar(struct tty_struct *tty, char ch)
+static void sdio_uart_send_xchar(struct tty_struct *tty, u8 ch)
 {
        struct sdio_uart_port *port = tty->driver_data;
 
index a80f059f77bf06ca71fbaed102d74305f4718418..a30dc054ffbf66a3c3fd1dc7fd2ababa5f42eba0 100644 (file)
@@ -811,7 +811,7 @@ static void rs_flush_buffer(struct tty_struct *tty)
  * This function is used to send a high-priority XON/XOFF character to
  * the device
  */
-static void rs_send_xchar(struct tty_struct *tty, char ch)
+static void rs_send_xchar(struct tty_struct *tty, u8 ch)
 {
        struct serial_state *info = tty->driver_data;
         unsigned long flags;
index 0393853b99475da4802eb9399d12a1b9a163db7b..80085b151b34d69bebfa3b05ddcf86d9f37d7e7f 100644 (file)
@@ -687,7 +687,7 @@ EXPORT_SYMBOL_GPL(uart_xchar_out);
  * This function is used to send a high-priority XON/XOFF character to
  * the device
  */
-static void uart_send_xchar(struct tty_struct *tty, char ch)
+static void uart_send_xchar(struct tty_struct *tty, u8 ch)
 {
        struct uart_state *state = tty->driver_data;
        struct uart_port *port;
index 005d91c63707224c0d0249a6167a39d6bb04b5f2..6a502110da619f1c53b6a427980804832ed49beb 100644 (file)
@@ -1149,7 +1149,7 @@ ssize_t redirected_tty_write(struct kiocb *iocb, struct iov_iter *iter)
  *
  * Locking: none for xchar method, write ordering for write method.
  */
-int tty_send_xchar(struct tty_struct *tty, char ch)
+int tty_send_xchar(struct tty_struct *tty, u8 ch)
 {
        bool was_stopped = tty->flow.stopped;
 
index e96c85f4f91edee52a0c05eb68f47d17a5218786..d3bedcc08738a6938af1bd9b4c4cb4558d23e30e 100644 (file)
@@ -410,7 +410,7 @@ void tty_wait_until_sent(struct tty_struct *tty, long timeout);
 void stop_tty(struct tty_struct *tty);
 void start_tty(struct tty_struct *tty);
 void tty_write_message(struct tty_struct *tty, char *msg);
-int tty_send_xchar(struct tty_struct *tty, char ch);
+int tty_send_xchar(struct tty_struct *tty, u8 ch);
 int tty_put_char(struct tty_struct *tty, unsigned char c);
 unsigned int tty_chars_in_buffer(struct tty_struct *tty);
 unsigned int tty_write_room(struct tty_struct *tty);
index f428c1b784a2006968a86be34773afec998e9652..7372124fbf90b3dc724e5ea40c7f0168191cd275 100644 (file)
@@ -242,7 +242,7 @@ struct serial_struct;
  *     Optional: If not provided, the device is assumed to have no FIFO.
  *     Usually correct to invoke via tty_wait_until_sent(). May sleep.
  *
- * @send_xchar: ``void ()(struct tty_struct *tty, char ch)``
+ * @send_xchar: ``void ()(struct tty_struct *tty, u8 ch)``
  *
  *     This routine is used to send a high-priority XON/XOFF character (@ch)
  *     to the @tty device.
@@ -374,7 +374,7 @@ struct tty_operations {
        void (*flush_buffer)(struct tty_struct *tty);
        void (*set_ldisc)(struct tty_struct *tty);
        void (*wait_until_sent)(struct tty_struct *tty, int timeout);
-       void (*send_xchar)(struct tty_struct *tty, char ch);
+       void (*send_xchar)(struct tty_struct *tty, u8 ch);
        int (*tiocmget)(struct tty_struct *tty);
        int (*tiocmset)(struct tty_struct *tty,
                        unsigned int set, unsigned int clear);
index 94ec913dfb76e84b711dd6f3f8333c2994de9b2e..69c75c041fe10aee4e11cde6e9d88cb994cd25c7 100644 (file)
@@ -1041,7 +1041,7 @@ static void rfcomm_tty_flush_buffer(struct tty_struct *tty)
        tty_wakeup(tty);
 }
 
-static void rfcomm_tty_send_xchar(struct tty_struct *tty, char ch)
+static void rfcomm_tty_send_xchar(struct tty_struct *tty, u8 ch)
 {
        BT_DBG("tty %p ch %c", tty, ch);
 }