tools: Move ARRAY_SIZE() into xen-tools/libs.h
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 4 Jul 2018 13:32:31 +0000 (14:32 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Thu, 3 Dec 2020 12:56:29 +0000 (12:56 +0000)
commit1d10a1ea64fc8b88eaf72122dfa03b384d93b00d
tree30f3752a02cc50a692900ea77eab72bbac5a82f1
parent3b8eed0439cf21c68cc153eac7469038c31b6dde
tools: Move ARRAY_SIZE() into xen-tools/libs.h

xen-tools/libs.h currently contains a shared BUILD_BUG_ON() implementation and
is used by some tools.  Extend this to include ARRAY_SIZE and clean up all the
opencoding.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit e1b7eb92d3ec6ce3ca68cffb36a148eb59f59613)

Gbp-Pq: Name 0024-tools-Move-ARRAY_SIZE-into-xen-tools-libs.h.patch
16 files changed:
tools/include/xen-tools/libs.h
tools/libxc/xc_private.h
tools/libxl/libxl_internal.h
tools/misc/xen-cpuid.c
tools/misc/xen-diag.c
tools/misc/xen-hptool.c
tools/misc/xen-livepatch.c
tools/misc/xen-mfndump.c
tools/misc/xenpm.c
tools/python/xen/lowlevel/xc/xc.c
tools/tests/vhpet/emul.h
tools/tests/x86_emulator/x86-emulate.h
tools/tests/xen-access/xen-access.c
tools/tests/xenstore/xs-test.c
tools/xenstore/utils.h
tools/xentrace/analyze.h