Re: [PATCH v1 3/3] kernel.h: Split out container_of() and typeof_memeber() macros
From: Herbert Xu
Date: Tue Jul 13 2021 - 08:20:17 EST
On Tue, Jul 13, 2021 at 01:23:01PM +0200, Greg Kroah-Hartman wrote:
>
> Life is messy and can not easily be partitioned into tiny pieces. That
> way usually ends up being even messier in the end...
One advantage is less chance of header loops which very often
involve kernel.h and one of the most common reasons for other
header files to include kernel.h is to access container_of.
However, I don't see much point in touching *.c files that include
kernel.h.
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt