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

tty: make tty_operations::write()'s count size_t



Unify with the rest of the code. Use size_t for counts and ssize_t for
retval.

Signed-off-by: default avatar"Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-30-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcaafbe6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -129,8 +129,8 @@ srmcons_do_write(struct tty_port *port, const char *buf, int count)
	return count;
}

static int
srmcons_write(struct tty_struct *tty, const u8 *buf, int count)
static ssize_t
srmcons_write(struct tty_struct *tty, const u8 *buf, size_t count)
{
	unsigned long flags;

+2 −1
Original line number Diff line number Diff line
@@ -70,7 +70,8 @@ static void nfcon_tty_close(struct tty_struct *tty, struct file *filp)
{
}

static int nfcon_tty_write(struct tty_struct *tty, const u8 *buf, int count)
static ssize_t nfcon_tty_write(struct tty_struct *tty, const u8 *buf,
			       size_t count)
{
	nfputs(buf, count);
	return count;
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ void line_flush_chars(struct tty_struct *tty)
	line_flush_buffer(tty);
}

int line_write(struct tty_struct *tty, const u8 *buf, int len)
ssize_t line_write(struct tty_struct *tty, const u8 *buf, size_t len)
{
	struct line *line = tty->driver_data;
	unsigned long flags;
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ extern void line_cleanup(struct tty_struct *tty);
extern void line_hangup(struct tty_struct *tty);
extern int line_setup(char **conf, unsigned nlines, char **def,
		      char *init, char *name);
extern int line_write(struct tty_struct *tty, const u8 *buf, int len);
extern ssize_t line_write(struct tty_struct *tty, const u8 *buf, size_t len);
extern unsigned int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty);
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
}


static int rs_write(struct tty_struct * tty, const u8 *buf, int count)
static ssize_t rs_write(struct tty_struct * tty, const u8 *buf, size_t count)
{
	/* see drivers/char/serialX.c to reference original version */

Loading