public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition
@ 2024-06-20  3:34 Zhongqiu Han
  2024-06-20  6:56 ` Andy Chiu
  2024-07-25 13:20 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 3+ messages in thread
From: Zhongqiu Han @ 2024-06-20  3:34 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, andy.chiu, conor.dooley,
	ancientmodern4, ben.dooks, bjorn
  Cc: quic_bjorande, linux-riscv, linux-kernel, quic_zhonhan

"WARN_ON(unlikely(x))" is excessive. WARN_ON() already uses unlikely()
internally.

Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
 arch/riscv/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
index 5a2edd7f027e..dcd282419456 100644
--- a/arch/riscv/kernel/signal.c
+++ b/arch/riscv/kernel/signal.c
@@ -84,7 +84,7 @@ static long save_v_state(struct pt_regs *regs, void __user **sc_vec)
 	datap = state + 1;
 
 	/* datap is designed to be 16 byte aligned for better performance */
-	WARN_ON(unlikely(!IS_ALIGNED((unsigned long)datap, 16)));
+	WARN_ON(!IS_ALIGNED((unsigned long)datap, 16));
 
 	get_cpu_vector_context();
 	riscv_v_vstate_save(&current->thread.vstate, regs);
-- 
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition
  2024-06-20  3:34 [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition Zhongqiu Han
@ 2024-06-20  6:56 ` Andy Chiu
  2024-07-25 13:20 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Chiu @ 2024-06-20  6:56 UTC (permalink / raw)
  To: Zhongqiu Han
  Cc: paul.walmsley, palmer, aou, conor.dooley, ancientmodern4,
	ben.dooks, bjorn, quic_bjorande, linux-riscv, linux-kernel

On Thu, Jun 20, 2024 at 11:35 AM Zhongqiu Han <quic_zhonhan@quicinc.com> wrote:
>
> "WARN_ON(unlikely(x))" is excessive. WARN_ON() already uses unlikely()
> internally.
>
> Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com>
> Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>

Reviewed-by: Andy Chiu <andy.chiu@sifive.com>

> ---
>  arch/riscv/kernel/signal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
> index 5a2edd7f027e..dcd282419456 100644
> --- a/arch/riscv/kernel/signal.c
> +++ b/arch/riscv/kernel/signal.c
> @@ -84,7 +84,7 @@ static long save_v_state(struct pt_regs *regs, void __user **sc_vec)
>         datap = state + 1;
>
>         /* datap is designed to be 16 byte aligned for better performance */
> -       WARN_ON(unlikely(!IS_ALIGNED((unsigned long)datap, 16)));
> +       WARN_ON(!IS_ALIGNED((unsigned long)datap, 16));
>
>         get_cpu_vector_context();
>         riscv_v_vstate_save(&current->thread.vstate, regs);
> --
> 2.25.1
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition
  2024-06-20  3:34 [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition Zhongqiu Han
  2024-06-20  6:56 ` Andy Chiu
@ 2024-07-25 13:20 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-07-25 13:20 UTC (permalink / raw)
  To: Zhongqiu Han
  Cc: linux-riscv, paul.walmsley, palmer, aou, andy.chiu, conor.dooley,
	ancientmodern4, ben.dooks, bjorn, quic_bjorande, linux-kernel

Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Thu, 20 Jun 2024 11:34:34 +0800 you wrote:
> "WARN_ON(unlikely(x))" is excessive. WARN_ON() already uses unlikely()
> internally.
> 
> Signed-off-by: Zhongqiu Han <quic_zhonhan@quicinc.com>
> Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
>  arch/riscv/kernel/signal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - riscv: signal: Remove unlikely() from WARN_ON() condition
    https://git.kernel.org/riscv/c/e1d96a07ba4b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-25 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20  3:34 [PATCH] riscv: signal: Remove unlikely() from WARN_ON() condition Zhongqiu Han
2024-06-20  6:56 ` Andy Chiu
2024-07-25 13:20 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox