mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 13:23:18 +00:00
tty: srmcons: 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> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: linux-alpha@vger.kernel.org Link: https://lore.kernel.org/r/20231206073712.17776-25-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
475fc6e2de
commit
14abfd0cb5
@ -53,7 +53,7 @@ srmcons_do_receive_chars(struct tty_port *port)
|
||||
do {
|
||||
result.as_long = callback_getc(0);
|
||||
if (result.bits.status < 2) {
|
||||
tty_insert_flip_char(port, (char)result.bits.c, 0);
|
||||
tty_insert_flip_char(port, (u8)result.bits.c, 0);
|
||||
count++;
|
||||
}
|
||||
} while((result.bits.status & 1) && (++loops < 10));
|
||||
@ -89,7 +89,7 @@ srmcons_receive_chars(struct timer_list *t)
|
||||
|
||||
/* called with callback_lock held */
|
||||
static void
|
||||
srmcons_do_write(struct tty_port *port, const char *buf, int count)
|
||||
srmcons_do_write(struct tty_port *port, const u8 *buf, size_t count)
|
||||
{
|
||||
size_t c;
|
||||
srmcons_result result;
|
||||
@ -131,7 +131,7 @@ srmcons_write(struct tty_struct *tty, const u8 *buf, size_t count)
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&srmcons_callback_lock, flags);
|
||||
srmcons_do_write(tty->port, (const char *) buf, count);
|
||||
srmcons_do_write(tty->port, buf, count);
|
||||
spin_unlock_irqrestore(&srmcons_callback_lock, flags);
|
||||
|
||||
return count;
|
||||
|
Loading…
Reference in New Issue
Block a user