Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230130111746.59830-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
2b8e3533 90be1f15

+1 -1
+1 -1
include/linux/container_of.h
··· 3 3 #define _LINUX_CONTAINER_OF_H 4 4 5 5 #include <linux/build_bug.h> 6 - #include <linux/err.h> 6 + #include <linux/stddef.h> 7 7 8 8 #define typeof_member(T, m) typeof(((T*)0)->m) 9 9