Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: make tty_operations::send_xchar accept u8 char

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>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
3a00da02 49943393

+10 -10
+2 -2
drivers/isdn/capi/capi.c
··· 1231 1231 tty_port_hangup(&mp->port); 1232 1232 } 1233 1233 1234 - static void capinc_tty_send_xchar(struct tty_struct *tty, char ch) 1234 + static void capinc_tty_send_xchar(struct tty_struct *tty, u8 ch) 1235 1235 { 1236 - pr_debug("capinc_tty_send_xchar(%d)\n", ch); 1236 + pr_debug("capinc_tty_send_xchar(%u)\n", ch); 1237 1237 } 1238 1238 1239 1239 static const struct tty_operations capinc_ops = {
+1 -1
drivers/mmc/core/sdio_uart.c
··· 792 792 return kfifo_len(&port->xmit_fifo); 793 793 } 794 794 795 - static void sdio_uart_send_xchar(struct tty_struct *tty, char ch) 795 + static void sdio_uart_send_xchar(struct tty_struct *tty, u8 ch) 796 796 { 797 797 struct sdio_uart_port *port = tty->driver_data; 798 798
+1 -1
drivers/tty/amiserial.c
··· 811 811 * This function is used to send a high-priority XON/XOFF character to 812 812 * the device 813 813 */ 814 - static void rs_send_xchar(struct tty_struct *tty, char ch) 814 + static void rs_send_xchar(struct tty_struct *tty, u8 ch) 815 815 { 816 816 struct serial_state *info = tty->driver_data; 817 817 unsigned long flags;
+1 -1
drivers/tty/serial/serial_core.c
··· 687 687 * This function is used to send a high-priority XON/XOFF character to 688 688 * the device 689 689 */ 690 - static void uart_send_xchar(struct tty_struct *tty, char ch) 690 + static void uart_send_xchar(struct tty_struct *tty, u8 ch) 691 691 { 692 692 struct uart_state *state = tty->driver_data; 693 693 struct uart_port *port;
+1 -1
drivers/tty/tty_io.c
··· 1149 1149 * 1150 1150 * Locking: none for xchar method, write ordering for write method. 1151 1151 */ 1152 - int tty_send_xchar(struct tty_struct *tty, char ch) 1152 + int tty_send_xchar(struct tty_struct *tty, u8 ch) 1153 1153 { 1154 1154 bool was_stopped = tty->flow.stopped; 1155 1155
+1 -1
include/linux/tty.h
··· 410 410 void stop_tty(struct tty_struct *tty); 411 411 void start_tty(struct tty_struct *tty); 412 412 void tty_write_message(struct tty_struct *tty, char *msg); 413 - int tty_send_xchar(struct tty_struct *tty, char ch); 413 + int tty_send_xchar(struct tty_struct *tty, u8 ch); 414 414 int tty_put_char(struct tty_struct *tty, unsigned char c); 415 415 unsigned int tty_chars_in_buffer(struct tty_struct *tty); 416 416 unsigned int tty_write_room(struct tty_struct *tty);
+2 -2
include/linux/tty_driver.h
··· 242 242 * Optional: If not provided, the device is assumed to have no FIFO. 243 243 * Usually correct to invoke via tty_wait_until_sent(). May sleep. 244 244 * 245 - * @send_xchar: ``void ()(struct tty_struct *tty, char ch)`` 245 + * @send_xchar: ``void ()(struct tty_struct *tty, u8 ch)`` 246 246 * 247 247 * This routine is used to send a high-priority XON/XOFF character (@ch) 248 248 * to the @tty device. ··· 374 374 void (*flush_buffer)(struct tty_struct *tty); 375 375 void (*set_ldisc)(struct tty_struct *tty); 376 376 void (*wait_until_sent)(struct tty_struct *tty, int timeout); 377 - void (*send_xchar)(struct tty_struct *tty, char ch); 377 + void (*send_xchar)(struct tty_struct *tty, u8 ch); 378 378 int (*tiocmget)(struct tty_struct *tty); 379 379 int (*tiocmset)(struct tty_struct *tty, 380 380 unsigned int set, unsigned int clear);
+1 -1
net/bluetooth/rfcomm/tty.c
··· 1041 1041 tty_wakeup(tty); 1042 1042 } 1043 1043 1044 - static void rfcomm_tty_send_xchar(struct tty_struct *tty, char ch) 1044 + static void rfcomm_tty_send_xchar(struct tty_struct *tty, u8 ch) 1045 1045 { 1046 1046 BT_DBG("tty %p ch %c", tty, ch); 1047 1047 }