Message ID | 17b01f14b89a5dba6935bbd8019ddf431d595890.1702553835.git.nicola.vetrini@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | address remaining violations of MISRA C:2012 Rule 11.9 | expand |
On Thu, 14 Dec 2023, Nicola Vetrini wrote: > 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@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
On 14.12.2023 22:32, Stefano Stabellini wrote: > On Thu, 14 Dec 2023, Nicola Vetrini wrote: >> 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@bugseng.com> > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Acked-by: Jan Beulich <jbeulich@suse.com>
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 ) {
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@bugseng.com> --- xen/arch/x86/hvm/dom0_build.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)