From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>, linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de,
ardb@kernel.org, rostedt@goodmis.org, stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: jump_label: Fix compat branch range check
Date: Sun, 30 Oct 2022 01:22:05 +0200 [thread overview]
Message-ID: <e0942c4b-8e81-5259-0c7c-97d09cc81669@linaro.org> (raw)
In-Reply-To: <20221029203535.940231-1-jiaxun.yang@flygoat.com>
On 29/10/22 22:35, Jiaxun Yang wrote:
> Cast upper bound of branch range to long to do signed compare,
> avoid negtive offset trigger this warning.
Typo "negative".
> Fixes: 9b6584e35f40 ("MIPS: jump_label: Use compact branches for >= r6")
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Cc: stable@vger.kernel.org
> ---
> arch/mips/kernel/jump_label.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/kernel/jump_label.c b/arch/mips/kernel/jump_label.c
> index 71a882c8c6eb..f7978d50a2ba 100644
> --- a/arch/mips/kernel/jump_label.c
> +++ b/arch/mips/kernel/jump_label.c
> @@ -56,7 +56,7 @@ void arch_jump_label_transform(struct jump_entry *e,
> * The branch offset must fit in the instruction's 26
> * bit field.
> */
> - WARN_ON((offset >= BIT(25)) ||
> + WARN_ON((offset >= (long)BIT(25)) ||
> (offset < -(long)BIT(25)));
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
prev parent reply other threads:[~2022-10-29 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-29 20:35 [PATCH] MIPS: jump_label: Fix compat branch range check Jiaxun Yang
2022-10-29 23:22 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e0942c4b-8e81-5259-0c7c-97d09cc81669@linaro.org \
--to=philmd@linaro.org \
--cc=ardb@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).