-
commit 39259369 introduced changes to container_of, this is hopefully the last part of it. In the linux kernel, container_of() takes a type name, and not a variable. Without this, in some cases it is needed to declare an unused variable in order to call container_of(). example: return container_of(dispatch, struct fallback_dispatch, base); instead of: struct fallback_dispatch *p; return container_of(dispatch, p, base); This introduce also list_first_entry(), a simple wrapper around container_of() to retrieve the first element of a non empty list. It allows to simplify list_for_each() and list_for_each_safe(). Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
20f5f2d9