]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
x86/traps: address violation of MISRA C Rule 8.4
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Tue, 28 May 2024 06:52:27 +0000 (08:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 28 May 2024 06:52:27 +0000 (08:52 +0200)
Rule 8.4 states: "A compatible declaration shall be visible when
an object or function with external linkage is defined".

The function do_general_protection is either used is asm code
or only within this unit, so there is no risk of this getting
out of sync with its definition, but the function must remain
extern.

Therefore, this function is deviated using a comment-based deviation.
No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c

index 468a036081029460c09fea42de81e7e5f9a6e0e2..9906e874d59398da31fffa22c59207068f145dfd 100644 (file)
@@ -1257,6 +1257,7 @@ void asmlinkage do_int3(struct cpu_user_regs *regs)
     pv_inject_hw_exception(X86_EXC_BP, X86_EVENT_NO_EC);
 }
 
+/* SAF-1-safe */
 void do_general_protection(struct cpu_user_regs *regs)
 {
 #ifdef CONFIG_PV