+45
−12
Loading
Currently, there are three "subclasses" of struct devres_node, which are struct devres, struct devres_group, struct devres_action. release_nodes(), which only knows about the base struct devres_node, assumes that for all "subclasses" struct devres_node is the first member in the structure and calls kfree() on struct devres_node. While this technically works, we can still improve semantical correctness and type safety with a corresponding free_node() callback. Additionally, we will need this callback soon in the Rust Devres code, to allocate and free the required memory on the Rust side. Reviewed-by:Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260202235210.55176-6-dakr@kernel.org Signed-off-by:
Danilo Krummrich <dakr@kernel.org>