summaryrefslogtreecommitdiff
path: root/include/linux/container_of.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/container_of.h')
-rw-r--r--include/linux/container_of.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/include/linux/container_of.h b/include/linux/container_of.h
index 2f4944b791b8..a6f242137b11 100644
--- a/include/linux/container_of.h
+++ b/include/linux/container_of.h
@@ -21,20 +21,4 @@
"pointer type mismatch in container_of()"); \
((type *)(__mptr - offsetof(type, member))); })
-/**
- * container_of_safe - 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.
- *
- * If IS_ERR_OR_NULL(ptr), ptr is returned unchanged.
- */
-#define container_of_safe(ptr, type, member) ({ \
- void *__mptr = (void *)(ptr); \
- static_assert(__same_type(*(ptr), ((type *)0)->member) || \
- __same_type(*(ptr), void), \
- "pointer type mismatch in container_of_safe()"); \
- IS_ERR_OR_NULL(__mptr) ? ERR_CAST(__mptr) : \
- ((type *)(__mptr - offsetof(type, member))); })
-
#endif /* _LINUX_CONTAINER_OF_H */