Re: [PATCH] MIPS: pic32: treat port as signed integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 28, 2022 at 03:23:44PM +0200, Jason A. Donenfeld wrote:
> 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@xxxxxxxxxxxxxxxx>
> Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
> ---
> Thomas - this is part of the -funsigned-char work I've been accumulating
> in my unsigned-char branch. If you want to take this as a fix for 6.1,
> go ahead. Otherwise, Linus asked me to keep the 6.2 unsigned-char
> patches together in my branch, so I'll take this, pending your Ack.
> -Jason
> 
>  arch/mips/include/asm/fw/fw.h             |  2 +-
>  arch/mips/pic32/pic32mzda/early_console.c | 13 ++++++-------
>  arch/mips/pic32/pic32mzda/init.c          |  2 +-
>  3 files changed, 8 insertions(+), 9 deletions(-)

applied to mips-fixes.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux