]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: pic32: treat port as signed integer
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 28 Oct 2022 13:23:44 +0000 (15:23 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 11 Nov 2022 14:53:58 +0000 (15:53 +0100)
commit2a9ef7e398977720f199f55d0b6d0e175962c9cf
treed575c80faf22cc8d50f6af9bca28e41b69b3af4e
parent98e1ddce1f3403b5989c2520448d4e8a171b4325
MIPS: pic32: treat port as signed integer

get_port_from_cmdline() returns an int, yet is assigned to a char, which
is wrong in its own right, but also, with char becoming unsigned, this
poses problems, because -1 is used as an error value. Further
complicating things, fw_init_early_console() is only ever called with a
-1 argument. Fix this up by removing the unused argument from
fw_init_early_console() and treating port as a proper signed integer.

Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/fw/fw.h
arch/mips/pic32/pic32mzda/early_console.c
arch/mips/pic32/pic32mzda/init.c