Commit 49b8220c authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman
Browse files

tty: ldops: unify to u8



Some hooks in struct tty_ldisc_ops still reference buffers by 'unsigned
char'. Unify to 'u8' as the rest of the tty layer does.

Signed-off-by: default avatar"Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810091510.13006-32-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e04ba41
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -806,14 +806,14 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
 * We don't provide read/write/poll interface for user space.
 */
static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file,
				 unsigned char *buf, size_t nr,
				 void **cookie, unsigned long offset)
				 u8 *buf, size_t nr, void **cookie,
				 unsigned long offset)
{
	return 0;
}

static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
				  const unsigned char *data, size_t count)
				  const u8 *data, size_t count)
{
	return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -158,8 +158,8 @@ static void serport_ldisc_receive(struct tty_struct *tty, const u8 *cp,
 */

static ssize_t serport_ldisc_read(struct tty_struct * tty, struct file * file,
				  unsigned char *kbuf, size_t nr,
				  void **cookie, unsigned long offset)
				  u8 *kbuf, size_t nr, void **cookie,
				  unsigned long offset)
{
	struct serport *serport = tty->disc_data;
	struct serio *serio;
+4 −5
Original line number Diff line number Diff line
@@ -257,9 +257,8 @@ static void ppp_asynctty_hangup(struct tty_struct *tty)
 * Pppd reads and writes packets via /dev/ppp instead.
 */
static ssize_t
ppp_asynctty_read(struct tty_struct *tty, struct file *file,
		  unsigned char *buf, size_t count,
		  void **cookie, unsigned long offset)
ppp_asynctty_read(struct tty_struct *tty, struct file *file, u8 *buf,
		  size_t count, void **cookie, unsigned long offset)
{
	return -EAGAIN;
}
@@ -269,8 +268,8 @@ ppp_asynctty_read(struct tty_struct *tty, struct file *file,
 * from the ppp generic stuff.
 */
static ssize_t
ppp_asynctty_write(struct tty_struct *tty, struct file *file,
		   const unsigned char *buf, size_t count)
ppp_asynctty_write(struct tty_struct *tty, struct file *file, const u8 *buf,
		   size_t count)
{
	return -EAGAIN;
}
+3 −4
Original line number Diff line number Diff line
@@ -255,8 +255,7 @@ static void ppp_sync_hangup(struct tty_struct *tty)
 * Pppd reads and writes packets via /dev/ppp instead.
 */
static ssize_t
ppp_sync_read(struct tty_struct *tty, struct file *file,
	      unsigned char *buf, size_t count,
ppp_sync_read(struct tty_struct *tty, struct file *file, u8 *buf, size_t count,
	      void **cookie, unsigned long offset)
{
	return -EAGAIN;
@@ -267,8 +266,8 @@ ppp_sync_read(struct tty_struct *tty, struct file *file,
 * from the ppp generic stuff.
 */
static ssize_t
ppp_sync_write(struct tty_struct *tty, struct file *file,
		const unsigned char *buf, size_t count)
ppp_sync_write(struct tty_struct *tty, struct file *file, const u8 *buf,
	       size_t count)
{
	return -EAGAIN;
}
+3 −4
Original line number Diff line number Diff line
@@ -3638,9 +3638,8 @@ static void gsmld_write_wakeup(struct tty_struct *tty)
 *	This code must be sure never to sleep through a hangup.
 */

static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
			  unsigned char *buf, size_t nr,
			  void **cookie, unsigned long offset)
static ssize_t gsmld_read(struct tty_struct *tty, struct file *file, u8 *buf,
			  size_t nr, void **cookie, unsigned long offset)
{
	return -EOPNOTSUPP;
}
@@ -3660,7 +3659,7 @@ static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
 */

static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
			   const unsigned char *buf, size_t nr)
			   const u8 *buf, size_t nr)
{
	struct gsm_mux *gsm = tty->disc_data;
	unsigned long flags;
Loading