|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/hvm: dom0: use helper to get sizeof struct field
commit e66237eb1a0e8a99424080370373816c7a53cf7d
Author: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
AuthorDate: Thu Dec 14 12:44:09 2023 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 19 13:49:54 2023 +0100
x86/hvm: dom0: use helper to get sizeof struct field
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.vetrini@xxxxxxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
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 70d31289b0..e59f6657d9 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 )
{
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |