container_of: apply typeof_member() to container_of()

container_of() uses the construct below:

	((type *)0)->member

to retrieve the type of the structure's member and then ensure that it
matches the type of the given pointer.

This construct being rather difficult to understand, the typeof_member()
macro was created to encapsulate it and give it a descriptive name.

Apply typeof_member() to container_of() to make it easier to read and
understand what this macro does.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Link: https://patch.msgid.link/20260714-containerof_refactor-v1-1-b5c31164d2ad@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vincent Mailhol 2026-07-14 20:18:01 +02:00 • committed by Greg Kroah-Hartman
commit f810b41def