lkml.org 
[lkml]   [2021]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 14/20] linux/compiler_types.h, linux/same_type.h: Split __same_type() to a separate header
Date
Include <linux/same_type.h> from <linux/compiler_types.h> for compatibility.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
include/linux/compiler_types.h | 7 ++++---
include/linux/same_type.h | 10 ++++++++++
2 files changed, 14 insertions(+), 3 deletions(-)
create mode 100644 include/linux/same_type.h

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 */
--
2.33.1
\
 
 \ /
  Last update: 2021-11-20 14:03    [W:0.306 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site