diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-12-06 08:36:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-08 12:02:37 +0100 |
commit | f32fcbedbe9290565e4eac3fd7c4c451d5478787 (patch) | |
tree | d18ccb3248fb01349aec21e7798a4d9a724a2947 /drivers/tty/hvc/hvc_riscv_sbi.c | |
parent | f3fb7367af89457a8818bc93e35a274ccb5b9e44 (diff) |
tty: hvc: 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: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Amit Shah <amit@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: virtualization@lists.linux.dev
Cc: linux-riscv@lists.infradead.org
Link: https://lore.kernel.org/r/20231206073712.17776-13-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/hvc/hvc_riscv_sbi.c')
-rw-r--r-- | drivers/tty/hvc/hvc_riscv_sbi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/hvc/hvc_riscv_sbi.c b/drivers/tty/hvc/hvc_riscv_sbi.c index 31f53fa77e4a..a72591279f86 100644 --- a/drivers/tty/hvc/hvc_riscv_sbi.c +++ b/drivers/tty/hvc/hvc_riscv_sbi.c @@ -15,9 +15,9 @@ #include "hvc_console.h" -static int hvc_sbi_tty_put(uint32_t vtermno, const char *buf, int count) +static ssize_t hvc_sbi_tty_put(uint32_t vtermno, const u8 *buf, size_t count) { - int i; + size_t i; for (i = 0; i < count; i++) sbi_console_putchar(buf[i]); @@ -25,9 +25,10 @@ static int hvc_sbi_tty_put(uint32_t vtermno, const char *buf, int count) return i; } -static int hvc_sbi_tty_get(uint32_t vtermno, char *buf, int count) +static ssize_t hvc_sbi_tty_get(uint32_t vtermno, u8 *buf, size_t count) { - int i, c; + size_t i; + int c; for (i = 0; i < count; i++) { c = sbi_console_getchar(); |