Skip to contentSkip to conversation

container_of: Update header inclusions

PATCH New Andy Shevchenko 1 participant 1 message Jan 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 container_of: Update header inclusions

The commit 848dba781f19 ("container_of: remove container_of_safe()") removed the code that uses err.h. Replace the inclusion by stddef.h which provides offsetof() definition which is still in use.

---
 include/linux/container_of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/container_of.h +1 -1
index 1d898f9158b4..713890c867be 100644
@@ -3,7 +3,7 @@
 #define _LINUX_CONTAINER_OF_H
 
 #include <linux/build_bug.h>
-#include <linux/err.h>
+#include <linux/stddef.h>
 
 #define typeof_member(T, m)	typeof(((T*)0)->m)
 
Signature · 1 line
2.39.0