]> Git Repo - linux.git/commit
kernel.h: split out container_of() and typeof_member() macros
authorAndy Shevchenko <[email protected]>
Tue, 9 Nov 2021 02:32:12 +0000 (18:32 -0800)
committerLinus Torvalds <[email protected]>
Tue, 9 Nov 2021 18:02:49 +0000 (10:02 -0800)
commitd2a8ebbf8192b84b11f1b204c4f7c602df32aeac
treef8537007908bbce7ea86724c45aeeb1b6db6a744
parentf5d80614844a725cbf66fd6524e01c218ede2141
kernel.h: split out container_of() and typeof_member() macros

kernel.h is being used as a dump for all kinds of stuff for a long time.
Here is the attempt cleaning it up by splitting out container_of() and
typeof_member() macros.

For time being include new header back to kernel.h to avoid twisted
indirected includes for existing users.

Note, there are _a lot_ of headers and modules that include kernel.h
solely for one of these macros and this allows to unburden compiler for
the twisted inclusion paths and to make new code cleaner in the future.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Boqun Feng <[email protected]>
Cc: Brendan Higgins <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Miguel Ojeda <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Thorsten Leemhuis <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/container_of.h [new file with mode: 0644]
include/linux/kernel.h
This page took 0.048228 seconds and 4 git commands to generate.