summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 23:05:45 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 13:22:21 +0100
commit8519d798017cd1aec6ac30945d4c19a274e4c861 (patch)
tree4865c88e86b1eec2b0b795d3b25aa7ad215eba11
parent80de74fa4fabd81922ad05c25ec9545c78a4a937 (diff)
linux/compiler_types.h, linux/same_type.h: Split __same_type() to a separate header
Include <linux/same_type.h> from <linux/compiler_types.h> for compatibility. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--include/linux/compiler_types.h7
-rw-r--r--include/linux/same_type.h10
2 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 1d32f4c03c9e..5a1626e2d331 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -2,6 +2,10 @@
#ifndef __LINUX_COMPILER_TYPES_H
#define __LINUX_COMPILER_TYPES_H
+
+#include <linux/same_type.h>
+
+
#ifndef __ASSEMBLY__
#ifdef __CHECKER__
@@ -272,9 +276,6 @@ struct ftrace_likely_data {
#define asm_inline asm
#endif
-/* Are two types/vars the same type (ignoring qualifiers)? */
-#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
-
/*
* __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving
* non-scalar types unchanged.
diff --git a/include/linux/same_type.h b/include/linux/same_type.h
new file mode 100644
index 000000000000..2e45edda6d31
--- /dev/null
+++ b/include/linux/same_type.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __LINUX_SAME_TYPE_H
+#define __LINUX_SAME_TYPE_H
+
+
+/* Are two types/vars the same type (ignoring qualifiers)? */
+#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
+
+
+#endif /* __LINUX_SAME_TYPE_H */