[PATCH -next 1/7] net: stmmac: dwmac-sun8i: Use for_each_child_of_node_scoped() and __free()

Andrew Lunn andrew at lunn.ch
Tue Aug 27 05:52:59 PDT 2024


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




More information about the linux-arm-kernel mailing list