From 74b000804485db0d1b02b4f714b975643379c405 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 7 Sep 2026 10:41:04 +0200 Subject: [PATCH] x86/altcall: hide casting away of const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ALT_CALL_PTR() really means to get rid of const (when necessary, i.e. when used from apply_alt_calls()): We want to patch the original call site, after all, and memory-wise that's unrelated to the struct alt_call * that we start from. No functional change intended. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- xen/arch/x86/include/asm/alternative-call.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/alternative-call.h b/xen/arch/x86/include/asm/alternative-call.h index 27024797f5..809023bc4d 100644 --- a/xen/arch/x86/include/asm/alternative-call.h +++ b/xen/arch/x86/include/asm/alternative-call.h @@ -9,7 +9,7 @@ struct alt_call { int32_t offset; }; -#define ALT_CALL_PTR(a) ((void *)&(a)->offset + (a)->offset) +#define ALT_CALL_PTR(a) ((void *)((long)&(a)->offset + (a)->offset)) #define ALT_CALL_LEN(a) (6) /*