From 9fd71d225729fd957bdf9e2c28d5e5030de85fe9 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 21 Sep 2026 09:58:31 +0200 Subject: [PATCH] x86/domain: address Misra rule 11.1 violation in reset_stack_and_call_ind() Eclair dislikes both sides of the comparison to differ in noreturn attributes, thus deeming this a violation of "Conversions shall not be performed between a pointer to a function and any other type". Since gcc doesn't permit use of "noreturn" types used in a typecast, resort to typeof(). No functional change intended. Signed-off-by: Jan Beulich Reviewed-by: Nicola Vetrini --- xen/arch/x86/include/asm/current.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/current.h b/xen/arch/x86/include/asm/current.h index 6139980ab1..fe9a86a3f7 100644 --- a/xen/arch/x86/include/asm/current.h +++ b/xen/arch/x86/include/asm/current.h @@ -208,7 +208,7 @@ unsigned long get_stack_dump_bottom (unsigned long sp); /* The constraint may only specify non-call-clobbered registers. */ #define reset_stack_and_call_ind(fn) \ ({ \ - (void)((fn) == (void (*)(void))NULL); \ + (void)((fn) == (typeof(dom_xen->arch.ctxt_switch->tail))NULL); \ switch_stack_and_jump(fn, "INDIRECT_CALL %", "b"); \ })