[PATCH net-next v2 00/13] net: Simplified with scoped function
Andrew Lunn
andrew at lunn.ch
Wed Aug 28 07:32:05 PDT 2024
On Wed, Aug 28, 2024 at 11:23:30AM +0800, Jinjie Ruan wrote:
> Simplify with scoped for each OF child loop and __free(), as well as
> dev_err_probe().
>
> Changes in v2:
> - Subject prefix: next -> net-next.
> - Split __free() from scoped for each OF child loop clean.
> - Fix use of_node_put() instead of __free() for the 5th patch.
I personally think all these __free() are ugly and magical. Can it
somehow be made part of of_get_child_by_name()? Add an
of_get_child_by_name_func_ref() which holds a reference to the node
for the scope of the function?
for_each_available_child_of_node_scoped() is fine. Once you have fixed
all the reverse christmas tree, please submit them. But i would like
to see alternatives to __free(), once which are less ugly.
Andrew
---
pw-bot: cr
More information about the linux-arm-kernel
mailing list