All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
	Karsten Keil <isdn@linux-pingi.de>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	netdev@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-bluetooth@vger.kernel.org
Subject: [PATCH 04/27] tty: make tty_operations::send_xchar accept u8 char
Date: Wed,  6 Dec 2023 08:36:49 +0100	[thread overview]
Message-ID: <20231206073712.17776-5-jirislaby@kernel.org> (raw)
In-Reply-To: <20231206073712.17776-1-jirislaby@kernel.org>

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
---
 drivers/isdn/capi/capi.c         | 4 ++--
 drivers/mmc/core/sdio_uart.c     | 2 +-
 drivers/tty/amiserial.c          | 2 +-
 drivers/tty/serial/serial_core.c | 2 +-
 drivers/tty/tty_io.c             | 2 +-
 include/linux/tty.h              | 2 +-
 include/linux/tty_driver.h       | 4 ++--
 net/bluetooth/rfcomm/tty.c       | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 2f3789515445..6e80d7bd3c4d 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -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 = {
diff --git a/drivers/mmc/core/sdio_uart.c b/drivers/mmc/core/sdio_uart.c
index a05322f15771..370fadf1d6d1 100644
--- a/drivers/mmc/core/sdio_uart.c
+++ b/drivers/mmc/core/sdio_uart.c
@@ -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;
 
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index a80f059f77bf..a30dc054ffbf 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -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;
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 0393853b9947..80085b151b34 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -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;
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 005d91c63707..6a502110da61 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -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;
 
diff --git a/include/linux/tty.h b/include/linux/tty.h
index e96c85f4f91e..d3bedcc08738 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -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);
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index f428c1b784a2..7372124fbf90 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -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);
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 94ec913dfb76..69c75c041fe1 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -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);
 }
-- 
2.43.0


  parent reply	other threads:[~2023-12-06  7:37 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06  7:36 [PATCH 00/27] tty: type unifications -- the last part Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 01/27] tty: goldfish: use bool for is_write parameter Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 02/27] tty: mmc: sdio_uart: switch sdio_in() to return u8 Jiri Slaby (SUSE)
2023-12-07 14:09   ` Ulf Hansson
2023-12-06  7:36 ` [PATCH 03/27] tty: switch tty_port::xmit_* to u8 Jiri Slaby (SUSE)
2023-12-06  7:36 ` Jiri Slaby (SUSE) [this message]
2023-12-06  8:27   ` [PATCH 04/27] tty: make tty_operations::send_xchar accept u8 char Geert Uytterhoeven
2023-12-07 14:09   ` Ulf Hansson
2023-12-06  7:36 ` [PATCH 05/27] tty: core: the rest to u8 Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 06/27] tty: ami: use u8 for characters and flag Jiri Slaby (SUSE)
2023-12-06  8:28   ` Geert Uytterhoeven
2023-12-06  7:36 ` [PATCH 07/27] tty: bcm: convert to u8 and size_t Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 08/27] tty: con3215: " Jiri Slaby (SUSE)
2023-12-08 13:19   ` Alexander Gordeev
2023-12-06  7:36 ` [PATCH 09/27] tty: con3270: " Jiri Slaby (SUSE)
2023-12-08 13:19   ` Alexander Gordeev
2023-12-06  7:36 ` [PATCH 10/27] tty: ehv_bytechan: " Jiri Slaby (SUSE)
2023-12-06  7:36   ` Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 11/27] tty: goldfish: " Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 12/27] tty: hvc: " Jiri Slaby (SUSE)
2023-12-06  7:36   ` Jiri Slaby (SUSE)
2023-12-06  7:36   ` Jiri Slaby (SUSE)
2023-12-06  9:30   ` Christophe Leroy
2023-12-06  9:30     ` Christophe Leroy
2023-12-06  9:30     ` Christophe Leroy
2023-12-06  7:36 ` [PATCH 13/27] tty: ipoctal: " Jiri Slaby (SUSE)
2023-12-06  7:36 ` [PATCH 14/27] tty: m68k: nfcon: " Jiri Slaby (SUSE)
2023-12-06  7:51   ` Geert Uytterhoeven
2023-12-06  7:37 ` [PATCH 15/27] tty: mips_ejtag_fdc: use u8 for character pointers Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 16/27] tty: mmc: sdio: use u8 for flag Jiri Slaby (SUSE)
2023-12-07 14:10   ` Ulf Hansson
2023-12-06  7:37 ` [PATCH 17/27] tty: moxa: convert to u8 and size_t Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 18/27] tty: mxser: " Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 19/27] tty: n_gsm: " Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 20/27] tty: n_hdlc: " Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 21/27] tty: nozomi: " Jiri Slaby (SUSE)
2023-12-07 12:50   ` Ilpo Järvinen
2023-12-06  7:37 ` [PATCH 22/27] tty: serdev: convert to u8 and size_t in serdev_controller_ops Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 23/27] tty: serdev: convert to u8 and size_t Jiri Slaby (SUSE)
2023-12-06  8:09   ` Johan Hovold
2023-12-07  1:47     ` Greg KH
2023-12-07  8:19       ` Johan Hovold
2023-12-07 10:09         ` Greg KH
2023-12-06  7:37 ` [PATCH 24/27] tty: srmcons: " Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 25/27] tty: ttyprintk: " Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 26/27] tty: um: convert to u8/__u8 " Jiri Slaby (SUSE)
2023-12-06  7:37 ` [PATCH 27/27] tty: xtensa/iss: use u8 Jiri Slaby (SUSE)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231206073712.17776-5-jirislaby@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=isdn@linux-pingi.de \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.