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>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>
Subject: [XEN PATCH 1/5] xen/hvm: use NULL as a null pointer constant
Date: Thu, 14 Dec 2023 12:44:06 +0100	[thread overview]
Message-ID: <7c52d4b78785a56aee1ffc3661503bdd145595d9.1702553835.git.nicola.vetrini@bugseng.com> (raw)
In-Reply-To: <cover.1702553835.git.nicola.vetrini@bugseng.com>

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/include/asm/hvm/irq.h | 2 +-
 xen/include/public/hvm/save.h      | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/include/asm/hvm/irq.h b/xen/arch/x86/include/asm/hvm/irq.h
index 1817ca6e2d22..87e89993a44f 100644
--- a/xen/arch/x86/include/asm/hvm/irq.h
+++ b/xen/arch/x86/include/asm/hvm/irq.h
@@ -136,7 +136,7 @@ struct hvm_girq_dpci_mapping {
 
 #define NR_ISAIRQS  16
 #define NR_LINK     4
-#define NR_HVM_DOMU_IRQS ARRAY_SIZE(((struct hvm_hw_vioapic *)0)->redirtbl)
+#define NR_HVM_DOMU_IRQS ARRAY_SIZE(((struct hvm_hw_vioapic *)NULL)->redirtbl)
 
 /* Protected by domain's event_lock */
 struct hvm_irq_dpci {
diff --git a/xen/include/public/hvm/save.h b/xen/include/public/hvm/save.h
index 2cf4238daaa1..42e8ff55b5b9 100644
--- a/xen/include/public/hvm/save.h
+++ b/xen/include/public/hvm/save.h
@@ -65,15 +65,15 @@ struct hvm_save_descriptor {
     struct __HVM_SAVE_TYPE_##_x { _type t; char c[_code]; char cpt[1];}
 #endif
 
-#define HVM_SAVE_TYPE(_x) __typeof__ (((struct __HVM_SAVE_TYPE_##_x *)(0))->t)
+#define HVM_SAVE_TYPE(_x) __typeof__ (((struct __HVM_SAVE_TYPE_##_x *)(NULL))->t)
 #define HVM_SAVE_LENGTH(_x) (sizeof (HVM_SAVE_TYPE(_x)))
-#define HVM_SAVE_CODE(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->c))
+#define HVM_SAVE_CODE(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(NULL))->c))
 
 #ifdef __XEN__
-# define HVM_SAVE_TYPE_COMPAT(_x) __typeof__ (((struct __HVM_SAVE_TYPE_COMPAT_##_x *)(0))->t)
+# define HVM_SAVE_TYPE_COMPAT(_x) __typeof__ (((struct __HVM_SAVE_TYPE_COMPAT_##_x *)(NULL))->t)
 # define HVM_SAVE_LENGTH_COMPAT(_x) (sizeof (HVM_SAVE_TYPE_COMPAT(_x)))
 
-# define HVM_SAVE_HAS_COMPAT(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->cpt)-1)
+# define HVM_SAVE_HAS_COMPAT(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(NULL))->cpt)-1)
 # define HVM_SAVE_FIX_COMPAT(_x, _dst, _size) __HVM_SAVE_FIX_COMPAT_##_x(_dst, _size)
 #endif
 
-- 
2.34.1



  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 ` Nicola Vetrini [this message]
2023-12-14 21:29   ` [XEN PATCH 1/5] xen/hvm: use NULL as a null pointer constant 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 ` [XEN PATCH 4/5] x86/hvm: dom0: use helper to get sizeof struct field Nicola Vetrini
2023-12-14 21:32   ` 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=7c52d4b78785a56aee1ffc3661503bdd145595d9.1702553835.git.nicola.vetrini@bugseng.com \
    --to=nicola.vetrini@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --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.