All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: xen-devel@lists.xenproject.org
Cc: consulting@bugseng.com,
	"Nicola Vetrini" <nicola.vetrini@bugseng.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: [XEN PATCH 4/5] x86/hvm: dom0: use helper to get sizeof struct field
Date: Thu, 14 Dec 2023 12:44:09 +0100	[thread overview]
Message-ID: <17b01f14b89a5dba6935bbd8019ddf431d595890.1702553835.git.nicola.vetrini@bugseng.com> (raw)
In-Reply-To: <cover.1702553835.git.nicola.vetrini@bugseng.com>

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(-)

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



  parent reply	other threads:[~2023-12-14 11:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 11:44 [XEN PATCH 0/5] address remaining violations of MISRA C:2012 Rule 11.9 Nicola Vetrini
2023-12-14 11:44 ` [XEN PATCH 1/5] xen/hvm: use NULL as a null pointer constant Nicola Vetrini
2023-12-14 21:29   ` Stefano Stabellini
2023-12-18 17:03     ` Jan Beulich
2023-12-14 11:44 ` [XEN PATCH 2/5] x86/ioapic: " Nicola Vetrini
2023-12-14 21:30   ` Stefano Stabellini
2023-12-18 17:04     ` Jan Beulich
2023-12-14 11:44 ` [XEN PATCH 3/5] xen/acpi: Use " Nicola Vetrini
2023-12-14 21:31   ` Stefano Stabellini
2023-12-18 17:05   ` Jan Beulich
2023-12-18 17:29     ` Nicola Vetrini
2023-12-14 11:44 ` Nicola Vetrini [this message]
2023-12-14 21:32   ` [XEN PATCH 4/5] x86/hvm: dom0: use helper to get sizeof struct field Stefano Stabellini
2023-12-19 10:44     ` Jan Beulich
2023-12-14 11:44 ` [XEN PATCH 5/5] xen/wait: address violations of MISRA C Rule 11.9 Nicola Vetrini
2023-12-14 21:33   ` Stefano Stabellini
2023-12-19 10:48   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17b01f14b89a5dba6935bbd8019ddf431d595890.1702553835.git.nicola.vetrini@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.