mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] riscv: Mark default_power_off() as __noreturn
@ 2026-07-27 10:03 Thorsten Blum
  2026-07-29 18:37 ` Paul Walmsley
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-07-27 10:03 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti
  Cc: Thorsten Blum, linux-riscv, linux-kernel

Since default_power_off() never returns, annotate it with the __noreturn
attribute to improve compiler optimizations.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/riscv/kernel/reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c
index 912288572226..2ae2e724f385 100644
--- a/arch/riscv/kernel/reset.c
+++ b/arch/riscv/kernel/reset.c
@@ -6,7 +6,7 @@
 #include <linux/reboot.h>
 #include <linux/pm.h>
 
-static void default_power_off(void)
+static void __noreturn default_power_off(void)
 {
 	while (1)
 		wait_for_interrupt();

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

* Re: [PATCH] riscv: Mark default_power_off() as __noreturn
  2026-07-27 10:03 [PATCH] riscv: Mark default_power_off() as __noreturn Thorsten Blum
@ 2026-07-29 18:37 ` Paul Walmsley
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Walmsley @ 2026-07-29 18:37 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
	linux-riscv, linux-kernel

On Mon, 27 Jul 2026, Thorsten Blum wrote:

> Since default_power_off() never returns, annotate it with the __noreturn
> attribute to improve compiler optimizations.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Thanks, queued for v7.3.


- Paul

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

end of thread, other threads:[~2026-07-29 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-27 10:03 [PATCH] riscv: Mark default_power_off() as __noreturn Thorsten Blum
2026-07-29 18:37 ` Paul Walmsley

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

Powered by JetHome