9
0
Fork 0

scripts/include: Add ARRAY_SIZE

ARRAY_SIZE is another define commonly used in tools. Add it to the
kernel includes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-02-02 09:30:20 +01:00
parent a883d9a3c0
commit dd29e91770
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,8 @@
#include <stdlib.h>
#include <assert.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define PERF_ALIGN(x, a) __PERF_ALIGN_MASK(x, (typeof(x))(a)-1)