Use of the proper helper macro also resolves a violation
of MISRA C Rule 11.9.
No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetr...@bugseng.com>
---
 xen/arch/x86/hvm/dom0_build.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index 70d31289b04a..e59f6657d918 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -1144,8 +1144,7 @@ static int __init pvh_setup_acpi(struct domain *d, 
paddr_t start_info)
     rc = hvm_copy_to_guest_phys(start_info +
                                 offsetof(struct hvm_start_info, rsdp_paddr),
                                 &rsdp_paddr,
-                                sizeof(((struct hvm_start_info *)
-                                        0)->rsdp_paddr),
+                                sizeof_field(struct hvm_start_info, 
rsdp_paddr),
                                 d->vcpu[0]);
     if ( rc )
     {
-- 
2.34.1


Reply via email to