[build] Provide common ARRAY_SIZE() definition

Several files define the ARRAY_SIZE() macro as used in Linux.  Provide
a common definition for this in include/compiler.h.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2017-03-10 15:40:17 +00:00
parent 4524cc11bf
commit afdebdc163
9 changed files with 9 additions and 19 deletions

View File

@@ -65,9 +65,6 @@ FILE_LICENCE ( GPL2_ONLY );
#define SUPPORTED_TP (1 << 7)
#define SUPPORTED_FIBRE (1 << 10)
/* from kernel.h */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
/* ----------------------------------- */
#define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \