riscv: Mark default_power_off() as __noreturn
PATCH 1/1 riscv: Mark default_power_off() as __noreturn
Since default_power_off() never returns, annotate it with the __noreturn attribute to improve compiler optimizations.
Signed-off-by Thorsten Blum <[email protected]>
--- arch/riscv/kernel/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/reset.c +1 -1
@@ -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 ();
Paul Walmsley
maintainerQuoted 4 lines · Thorsten Blum
Since
default_power_off()never returns, annotate it with the__noreturnattribute to improve compiler optimizations.Signed-off-by Thorsten Blum <[email protected]>
Thanks, queued for v7.3.
- Paul