Re: [PATCH -next 1/7] net: stmmac: dwmac-sun8i: Use for_each_child_of_node_scoped() and __free()
From: Andrew Lunn
Date: Tue Aug 27 2024 - 08:53:28 EST
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.
I personally find __free() ugly, and would prefer to reject those
changes.
Andrew