Thread (39 messages) 39 messages, 6 authors, 2024-08-29

Re: [PATCH net-next v2 00/13] net: Simplified with scoped function

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-08-28 14:32:29
Also in: linux-arm-kernel, linux-sunxi, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help