MIPS: jump_label: Fix compat branch range check
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Thu, 3 Nov 2022 15:10:53 +0000 (15:10 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Nov 2022 08:58:24 +0000 (09:58 +0100)
commitc198524a99cbf63a031bbf6d7083dd10e5ba0d34
treea2dc07f6cfc16c3c4c4d15fa03249618b428a0e1
parent9713ceffa40aa0ded8a6241e14f902c35b3a670e
MIPS: jump_label: Fix compat branch range check

commit 64ac0befe75bdfaffc396c2b4a0ed5ae6920eeee upstream.

Cast upper bound of branch range to long to do signed compare,
avoid negative offset trigger this warning.

Fixes: 9b6584e35f40 ("MIPS: jump_label: Use compact branches for >= r6")
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/kernel/jump_label.c