lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211120130104.185699-6-alx.manpages@gmail.com>
Date:   Sat, 20 Nov 2021 14:00:48 +0100
From:   Alejandro Colomar <alx.manpages@...il.com>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Alejandro Colomar <alx.manpages@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Arnd Bergmann <arnd@...db.de>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Kees Cook <keescook@...omium.org>,
        Joe Perches <joe@...ches.com>
Subject: [PATCH v2 05/20] linux/container_of.h, linux/typeof_member.h: Split typeof_member() into a separate header

Include <linux/typeof_member.h> from <linux/container_of.h> for compatibility.

Signed-off-by: Alejandro Colomar <alx.manpages@...il.com>
---
 include/linux/container_of.h  | 3 ++-
 include/linux/typeof_member.h | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/typeof_member.h

diff --git a/include/linux/container_of.h b/include/linux/container_of.h
index 2f4944b791b8..220990db7b61 100644
--- a/include/linux/container_of.h
+++ b/include/linux/container_of.h
@@ -2,10 +2,11 @@
 #ifndef _LINUX_CONTAINER_OF_H
 #define _LINUX_CONTAINER_OF_H
 
+
 #include <linux/build_bug.h>
 #include <linux/err.h>
+#include <linux/typeof_member.h>
 
-#define typeof_member(T, m)	typeof(((T*)0)->m)
 
 /**
  * container_of - cast a member of a structure out to the containing structure
diff --git a/include/linux/typeof_member.h b/include/linux/typeof_member.h
new file mode 100644
index 000000000000..1f3bfb3c17d2
--- /dev/null
+++ b/include/linux/typeof_member.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_TYPEOF_MEMBER_H
+#define _LINUX_TYPEOF_MEMBER_H
+
+
+#define typeof_member(T, m)  typeof(((T *)0)->m)
+
+
+#endif	/* _LINUX_TYPEOF_MEMBER_H */
-- 
2.33.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ