mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	ardb@kernel.org, rostedt@goodmis.org, stable@vger.kernel.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2] MIPS: jump_label: Fix compat branch range check
Date: Wed, 9 Nov 2022 11:07:18 +0000	[thread overview]
Message-ID: <7cf55c95-540e-b182-b4b3-e641535752e1@flygoat.com> (raw)
In-Reply-To: <20221103151053.213583-1-jiaxun.yang@flygoat.com>



在 2022/11/3 15:10, Jiaxun Yang 写道:
> 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>

Ping :-)

Thanks
- Jiaxun

> ---
> v2: Fix typo, collect review tags.
> ---
>   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)));
>   
>   			insn.j_format.opcode = bc6_op;


  reply	other threads:[~2022-11-09 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 15:10 Jiaxun Yang
2022-11-09 11:07 ` Jiaxun Yang [this message]
2022-11-11 15:04 ` Thomas Bogendoerfer

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=7cf55c95-540e-b182-b4b3-e641535752e1@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=ardb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=philmd@linaro.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

all inboxes | Powered by JetHome®