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, 1 Oct 2020 12:50:58 +0000 (13:50 +0100)
commite49d07d95a8405360aa8db51fd62c74d4436722e
treec0db4ebbcbf89fdfa100b6d3a47e10fca934e8d2
parent8936b57325a7ac057b8bee0bec568f81d4cc1cc2
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