On 31.07.2019 14:49, Andrew Cooper wrote: > I don't see a way to avoid expanding node twice, but given that its wrapper > is in ALL_CAPS and obviously a macro. > > Furthermore, experimenting with a deliberate attempt to provoke this, I got > > numa.c: In function ‘numa_initmem_init’: > > /local/xen.git/xen/include/xen/nodemask.h:90:10: error: nonconstant array > index in initializer > > [(node) / BITS_PER_LONG] = 1UL << ((node) % BITS_PER_LONG) \ > > ^ > > numa.c:274:23: note: in expansion of macro ‘NODEMASK_OF’ > > node_online_map = NODEMASK_OF(foo++); > > ^~~~~~~~~~~ > > /local/xen.git/xen/include/xen/nodemask.h:90:10: note: (near initialization > for ‘(anonymous).bits’) > > [(node) / BITS_PER_LONG] = 1UL << ((node) % BITS_PER_LONG) \ > > ^ > > numa.c:274:23: note: in expansion of macro ‘NODEMASK_OF’ > > node_online_map = NODEMASK_OF(foo++); > > ^~~~~~~~~~~ > > from GCC 6.3, which I think covers everything we need, and will prevent side > effects from double expansion in practice.
Ah, right. With this my R-b applies to the change as is (with the additional adjustments folded in that you've pointed out). Jan _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
