Re: [PATCH 1/1] checkpatch: Deprecate container_of() in favour of container_of_const()

From: Christoph Hellwig

Date: Wed Nov 05 2025 - 08:01:48 EST


Well, if container_of_const is a drop-in replacement for all uses of
container_of, just fix the implementation? If it is an almost but not
complete replacement, find a different name for the few uses. And if
it's not anywhere near drop in, just using container_of make a lot more
sense.

Just in case it wasn't clear: We really should keep the shorter nice
name as the default if at all possible. Both because it reads better
and because it avoids churn.