arm64/traps: fix MISRA C 2012 Rule 8.4 violations
authorXenia Ragiadakou <burzalodowa@gmail.com>
Tue, 28 Jun 2022 15:07:38 +0000 (17:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 28 Jun 2022 15:07:38 +0000 (17:07 +0200)
Add a function prototype for do_bad_mode() in <asm/arm64/traps.h> and include
header <asm/traps.h> in traps.c, so that the declarations of the functions
do_bad_mode() and finalize_instr_emulation(), which have external linkage,
are visible before the function definitions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/arch/arm/arm64/traps.c
xen/arch/arm/include/asm/arm64/traps.h

index 3f8858acec06d9f57a332239a1be6c907366fcd3..a995ad7c2c0991491958aa75ab338ef72d92b8fb 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/hsr.h>
 #include <asm/system.h>
 #include <asm/processor.h>
+#include <asm/traps.h>
 
 #include <public/xen.h>
 
index 2379b578cb187317e52ee6d77006987122b41250..a347cb13d6d99937bc2cb90eccddcf4117fe5c69 100644 (file)
@@ -6,6 +6,8 @@ void inject_undef64_exception(struct cpu_user_regs *regs, int instr_len);
 void do_sysreg(struct cpu_user_regs *regs,
                const union hsr hsr);
 
+void do_bad_mode(struct cpu_user_regs *regs, int reason);
+
 #endif /* __ASM_ARM64_TRAPS__ */
 /*
  * Local variables: