]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
x86/svm: Rework VMCB_ACCESSORS() to use a plain type name
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 May 2024 15:29:11 +0000 (16:29 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 May 2024 16:26:39 +0000 (17:26 +0100)
This avoids having a function call in a typeof() expression.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/arch/x86/include/asm/hvm/svm/vmcb.h

index 0396d10b90baf989da6d17ea23b570ac98d02cb7..28f715e376922c51d07ed3253a2f26062f67fa1c 100644 (file)
@@ -630,7 +630,7 @@ vmcb_get_ ## name(const struct vmcb_struct *vmcb) \
 }
 
 #define VMCB_ACCESSORS(name, cleanbit) \
-        VMCB_ACCESSORS_(name, typeof(alloc_vmcb()->_ ## name), cleanbit)
+    VMCB_ACCESSORS_(name, typeof(((struct vmcb_struct){})._ ## name), cleanbit)
 
 VMCB_ACCESSORS(cr_intercepts, intercepts)
 VMCB_ACCESSORS(dr_intercepts, intercepts)