]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/hvm: use NULL as a null pointer constant
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Thu, 14 Dec 2023 11:44:06 +0000 (12:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Dec 2023 12:48:42 +0000 (13:48 +0100)
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>
xen/arch/x86/include/asm/hvm/irq.h
xen/include/public/hvm/save.h

index 1817ca6e2d22e044d0a03ce079a8cdcc6c991260..87e89993a44f48f366fa84e851688f383cb562d4 100644 (file)
@@ -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 {
index 2cf4238daaa11be44062064203e776c835852848..ff0048e5f83d4f127d2b4e977520da81f03229ac 100644 (file)
@@ -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