summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-11-19 20:10:18 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2021-11-20 17:04:53 +0100
commit4e80e1f3074078887999c1d105de12a7fce5699c (patch)
tree16b1f1d2cb7b9d83037c378a3088ba78774a61dc
parent5aaea7f43dbecd47da5eaf019c3660d8b24dcd03 (diff)
tools/include/linux/: Don't redefine container_of()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--tools/include/linux/kernel.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 1dc6de4924a3..dd5dee78ee6f 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -9,6 +9,7 @@
#include <linux/array_size.h>
#include <linux/build_bug.h>
#include <linux/compiler.h>
+#include <linux/container_of.h>
#include <linux/offsetof.h>
#include <endian.h>
#include <byteswap.h>
@@ -23,19 +24,6 @@
#define PERF_ALIGN(x, a) __PERF_ALIGN_MASK(x, (typeof(x))(a)-1)
#define __PERF_ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
-#ifndef container_of
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof(((type *)0)->member) * __mptr = (ptr); \
- (type *)((char *)__mptr - offsetof(type, member)); })
-#endif
-
#ifndef max
#define max(x, y) ({ \
typeof(x) _max1 = (x); \