diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-10-30 16:17:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-11-01 10:08:38 +0100 |
commit | 1ba220dcc3a8bd0369555e7c41ed246e889038fe (patch) | |
tree | 9d76553c7ed63c40a20de7e48a151dcf8faaa3a5 /scripts | |
parent | 531c74af49d70b7079488988fa0d11274b4bd599 (diff) | |
download | barebox-1ba220dcc3a8bd0369555e7c41ed246e889038fe.tar.gz barebox-1ba220dcc3a8bd0369555e7c41ed246e889038fe.tar.xz |
include: move ARRAY_AND_SIZE to <linux/kernel.h>
Linux defines this macro at multiple places. We define it once, but in
<common.h>, which is a bit heavy weight. Move it next to the
ARRAY_SIZE() definition.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211030141739.2207431-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/include/linux/kernel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/include/linux/kernel.h b/scripts/include/linux/kernel.h index dc2e64e164..f3083ff354 100644 --- a/scripts/include/linux/kernel.h +++ b/scripts/include/linux/kernel.h @@ -9,6 +9,7 @@ #define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |