[PATCH v2 12/24] powerpc/cpu: Mark start_secondary_resume() __noreturn

Christophe Leroy christophe.leroy at csgroup.eu
Mon Feb 13 23:19:27 PST 2023



Le 14/02/2023 à 08:05, Josh Poimboeuf a écrit :
> start_secondary_resume() doesn't return.  Annotate it as such.  By
> extension this also makes arch_cpu_idle_dead() noreturn.
> 
> Acked-by: Michael Ellerman <mpe at ellerman.id.au> (powerpc)
> Signed-off-by: Josh Poimboeuf <jpoimboe at kernel.org>

Reviewed-by: Christophe Leroy <christophe.leroy at csgroup.eu>

> ---
>   arch/powerpc/include/asm/smp.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> index f63505d74932..cfd42ca8765c 100644
> --- a/arch/powerpc/include/asm/smp.h
> +++ b/arch/powerpc/include/asm/smp.h
> @@ -66,7 +66,7 @@ void start_secondary(void *unused);
>   extern int smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us);
>   extern int smp_send_safe_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us);
>   extern void smp_send_debugger_break(void);
> -extern void start_secondary_resume(void);
> +extern void __noreturn start_secondary_resume(void);

Would have been a good opportunity to drop the pointless 'extern' keyword.

Checkpatch reports:

CHECK: extern prototypes should be avoided in .h files
#19: FILE: arch/powerpc/include/asm/smp.h:69:
+extern void __noreturn start_secondary_resume(void);


>   extern void smp_generic_give_timebase(void);
>   extern void smp_generic_take_timebase(void);
>   


More information about the linux-arm-kernel mailing list