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>
Tue, 26 May 2020 12:03:18 +0000 (14:03 +0200)
commita8daf4608a0f3ca01ff900ff6c96aca659c5673a
treef90aef9b3ae3c133aeb1b446ba36fb2e80132923
parent2a9f501e6fb2444045d94408d7ccf7f555e2c5ce
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)
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