Message ID | 20240528153204.1350919-1-andrew.cooper3@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/svm: Rework VMCB_ACCESSORS() to use a plain type name | expand |
On 28.05.2024 17:32, Andrew Cooper wrote: > 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>
On Tue, 2024-05-28 at 17:37 +0200, Jan Beulich wrote: > On 28.05.2024 17:32, Andrew Cooper wrote: > > 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> ~ Oleksii
diff --git a/xen/arch/x86/include/asm/hvm/svm/vmcb.h b/xen/arch/x86/include/asm/hvm/svm/vmcb.h index 0396d10b90ba..28f715e37692 100644 --- a/xen/arch/x86/include/asm/hvm/svm/vmcb.h +++ b/xen/arch/x86/include/asm/hvm/svm/vmcb.h @@ -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)
This avoids having a function call in a typeof() expression. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> --- xen/arch/x86/include/asm/hvm/svm/vmcb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 2d93f78bfe25f695d8ffb61d110da9df293ed71b prerequisite-patch-id: 4f38737ad5ea15b0341664ee1c6b96d0d00b6700