[PATCH -next 1/7] net: stmmac: dwmac-sun8i: Use for_each_child_of_node_scoped() and __free()
Jinjie Ruan
ruanjinjie at huawei.com
Tue Aug 27 18:59:41 PDT 2024
On 2024/8/27 20:52, Andrew Lunn wrote:
> On Tue, Aug 27, 2024 at 03:52:13PM +0800, Jinjie Ruan wrote:
>> Avoid need to manually handle of_node_put() by using
>> for_each_child_of_node_scoped() and __free(), which can simplfy code.
>
> Please could you split this in two. for_each_child_of_node_scoped() is
> fine, it solves a common bug, forgetting to do a node_put() on a early
> exit from the loop.
ok, that is nice.
>
> I personally find __free() ugly, and would prefer to reject those
> changes.
>
> Andrew
>
More information about the linux-arm-kernel
mailing list