mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: add missing noreturn attributes
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>
This commit is contained in:
1 parent
9ea5d035db
commit
f143ff92e4
4 files changed
+4
-4
No files matched your search
@@ -934,7 +934,7 @@ static void __init efi_arch_blexit(void)
|
||||
efi_bs->FreePool(memmap);
|
||||
}
|
||||
|
||||
static void __init efi_arch_halt(void)
|
||||
static void noreturn __init efi_arch_halt(void)
|
||||
{
|
||||
stop_cpu();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ void inject_undef64_exception(struct cpu_user_regs *regs);
|
||||
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__ */
|
||||
/*
|
||||
|
||||
@@ -571,7 +571,7 @@ extern register_t __cpu_logical_map[];
|
||||
#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);
|
||||
|
||||
@@ -63,7 +63,7 @@ bool __read_mostly acpi_disabled;
|
||||
|
||||
domid_t __read_mostly max_init_domid;
|
||||
|
||||
static __used void init_done(void)
|
||||
static __used void noreturn init_done(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
||||