hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/sh_intc.h
....@@ -97,7 +97,10 @@
9797 unsigned int nr_subgroups;
9898 };
9999
100
-#define _INTC_ARRAY(a) a, __same_type(a, NULL) ? 0 : sizeof(a)/sizeof(*a)
100
+#define _INTC_SIZEOF_OR_ZERO(a) (_Generic(a, \
101
+ typeof(NULL): 0, \
102
+ default: sizeof(a)))
103
+#define _INTC_ARRAY(a) a, _INTC_SIZEOF_OR_ZERO(a)/sizeof(*a)
101104
102105 #define INTC_HW_DESC(vectors, groups, mask_regs, \
103106 prio_regs, sense_regs, ack_regs) \