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

Configure Feed

Select the types of activity you want to include in your feed.

tty: nozomi: convert to u8 and size_t

Switch character types to u8 and sizes to size_t. To conform to
characters/sizes in the rest of the tty layer.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20231206073712.17776-22-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
5c99e297 5655b16e

+4 -5
+4 -5
drivers/tty/nozomi.c
··· 783 783 tty_insert_flip_char(&port->port, buf[0], TTY_NORMAL); 784 784 size = 0; 785 785 } else if (size < RECEIVE_BUF_MAX) { 786 - size -= tty_insert_flip_string(&port->port, 787 - (char *)buf, size); 786 + size -= tty_insert_flip_string(&port->port, buf, size); 788 787 } else { 789 - i = tty_insert_flip_string(&port->port, 790 - (char *)buf, RECEIVE_BUF_MAX); 788 + i = tty_insert_flip_string(&port->port, buf, 789 + RECEIVE_BUF_MAX); 791 790 size -= i; 792 791 offset += i; 793 792 } ··· 1583 1584 static ssize_t ntty_write(struct tty_struct *tty, const u8 *buffer, 1584 1585 size_t count) 1585 1586 { 1586 - int rval = -EINVAL; 1587 1587 struct nozomi *dc = get_dc_by_tty(tty); 1588 1588 struct port *port = tty->driver_data; 1589 1589 unsigned long flags; 1590 + size_t rval; 1590 1591 1591 1592 if (!dc || !port) 1592 1593 return -ENODEV;