[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240903151437.1002990-7-vincenzo.frascino@arm.com>
Date: Tue, 3 Sep 2024 16:14:34 +0100
From: Vincenzo Frascino <vincenzo.frascino@....com>
To: linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org,
linux-mm@...ck.org
Cc: Vincenzo Frascino <vincenzo.frascino@....com>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Naveen N Rao <naveen@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H . Peter Anvin" <hpa@...or.com>,
Theodore Ts'o <tytso@....edu>,
Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: [PATCH 6/9] vdso: Split linux/array_size.h
The VDSO implementation includes headers from outside of the
vdso/ namespace.
Split linux/array_size.h to make sure that the generic library
uses only the allowed namespace.
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Jason A. Donenfeld <Jason@...c4.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
---
include/linux/array_size.h | 8 +-------
include/vdso/array_size.h | 13 +++++++++++++
2 files changed, 14 insertions(+), 7 deletions(-)
create mode 100644 include/vdso/array_size.h
diff --git a/include/linux/array_size.h b/include/linux/array_size.h
index 06d7d83196ca..ca9e63b419c4 100644
--- a/include/linux/array_size.h
+++ b/include/linux/array_size.h
@@ -2,12 +2,6 @@
#ifndef _LINUX_ARRAY_SIZE_H
#define _LINUX_ARRAY_SIZE_H
-#include <linux/compiler.h>
-
-/**
- * ARRAY_SIZE - get the number of elements in array @arr
- * @arr: array to be sized
- */
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
+#include <vdso/array_size.h>
#endif /* _LINUX_ARRAY_SIZE_H */
diff --git a/include/vdso/array_size.h b/include/vdso/array_size.h
new file mode 100644
index 000000000000..4079f7a5f86e
--- /dev/null
+++ b/include/vdso/array_size.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _VDSO_ARRAY_SIZE_H
+#define _VDSO_ARRAY_SIZE_H
+
+#include <linux/compiler.h>
+
+/**
+ * ARRAY_SIZE - get the number of elements in array @arr
+ * @arr: array to be sized
+ */
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
+
+#endif /* _VDSO_ARRAY_SIZE_H */
--
2.34.1
Powered by blists - more mailing lists