The marked functions never return to their caller, but lack the
`noreturn' attribute.
Functions that never return should be declared with a `noreturn'
attribute.
The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not
currently accepted in Xen), and also Rule 2.1: "A project shall not
contain unreachable code". Depending on the compiler used and the
compiler optimization used, the lack of `noreturn' might lead to the
presence of unreachable code.
No functional change.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Signed-off-by: Victor Lira <victorm.lira@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
efi_bs->FreePool(memmap);
}
-static void __init efi_arch_halt(void)
+static void noreturn __init efi_arch_halt(void)
{
stop_cpu();
}
void do_sysreg(struct cpu_user_regs *regs,
const union hsr hsr);
-void do_bad_mode(struct cpu_user_regs *regs, int reason);
+void noreturn do_bad_mode(struct cpu_user_regs *regs, int reason);
#endif /* __ASM_ARM64_TRAPS__ */
/*
#endif
#ifndef __ASSEMBLY__
-void panic_PAR(uint64_t par);
+void noreturn panic_PAR(uint64_t par);
/* Debugging functions are declared with external linkage to aid development. */
void show_registers(const struct cpu_user_regs *regs);
domid_t __read_mostly max_init_domid;
-static __used void init_done(void)
+static __used void noreturn init_done(void)
{
int rc;