Skip to content

Commit 188942f

Browse files
fancertsbogend
authored andcommitted
tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning
mips_ejtag_fdc_encode() method expects having a first argument passed of the "u8 **" type, meanwhile the driver passes the "const char **" type. That causes the next build-warning: drivers/tty/mips_ejtag_fdc.c: In function ‘mips_ejtag_fdc_console_write’: drivers/tty/mips_ejtag_fdc.c:343:32: error: passing argument 1 of ‘mips_ejtag_fdc_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types] word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1); ^ drivers/tty/mips_ejtag_fdc.c:216:24: note: expected ‘const u8 ** {aka const unsigned char **}’ but argument is of type ‘const char **’ static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs, ^~~~~~~~~~~~~~~~~~~~~ Fix it by altering the type of the pointer which is passed to the mips_ejtag_fdc_encode() method. Fixes: ce7cbd9 ("tty: mips_ejtag_fdc: use u8 for character pointers") Signed-off-by: Serge Semin <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 6d778f6 commit 188942f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/mips_ejtag_fdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static void mips_ejtag_fdc_console_write(struct console *c, const char *s,
309309
unsigned int i, buf_len, cpu;
310310
bool done_cr = false;
311311
char buf[4];
312-
const char *buf_ptr = buf;
312+
const u8 *buf_ptr = buf;
313313
/* Number of bytes of input data encoded up to each byte in buf */
314314
u8 inc[4];
315315

0 commit comments

Comments
 (0)