tty: mips_ejtag_fdc: use u8 for character pointers
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 6 Dec 2023 07:37:00 +0000 (08:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 11:02:37 +0000 (12:02 +0100)
mips_ejtag_fdc_encode() and mips_ejtag_fdc_put_chan() declare arrays of
pointers to characters. Switch their types from char to u8 to conform
to the current tty layer types for characters.

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

index 369ec71c24ef056acb03b3e0a4897eff9ccd185d..aac80b69a069c38b12f85c8bcb4475e36729d83e 100644 (file)
@@ -213,16 +213,16 @@ struct fdc_word {
  */
 
 /* ranges >= 1 && sizes[0] >= 1 */
-static struct fdc_word mips_ejtag_fdc_encode(const char **ptrs,
+static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
                                             unsigned int *sizes,
                                             unsigned int ranges)
 {
        struct fdc_word word = { 0, 0 };
-       const char **ptrs_end = ptrs + ranges;
+       const u8 **ptrs_end = ptrs + ranges;
 
        for (; ptrs < ptrs_end; ++ptrs) {
-               const char *ptr = *(ptrs++);
-               const char *end = ptr + *(sizes++);
+               const u8 *ptr = *(ptrs++);
+               const u8 *end = ptr + *(sizes++);
 
                for (; ptr < end; ++ptr) {
                        word.word |= (u8)*ptr << (8*word.bytes);
@@ -417,7 +417,7 @@ static unsigned int mips_ejtag_fdc_put_chan(struct mips_ejtag_fdc_tty *priv,
 {
        struct mips_ejtag_fdc_tty_port *dport;
        struct tty_struct *tty;
-       const char *ptrs[2];
+       const u8 *ptrs[2];
        unsigned int sizes[2] = { 0 };
        struct fdc_word word = { .bytes = 0 };
        unsigned long flags;