summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/common.h2
-rw-r--r--include/linux/kernel.h1
-rw-r--r--scripts/include/linux/kernel.h1
3 files changed, 2 insertions, 2 deletions
diff --git a/include/common.h b/include/common.h
index e37630243e..4167d4676e 100644
--- a/include/common.h
+++ b/include/common.h
@@ -88,8 +88,6 @@ enum autoboot_state do_autoboot_countdown(void);
void __noreturn start_barebox(void);
void shutdown_barebox(void);
-#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
/*
* The STACK_ALIGN_ARRAY macro is used to allocate a buffer on the stack that
* meets a minimum alignment requirement.
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 9ccdd60224..4483d33e65 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -15,6 +15,7 @@
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
+#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
/*
* This looks more complex than it should be. But we need to
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))