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

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

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-08-28 14:45:43
Also in: linux-arm-kernel, linux-sunxi, lkml

On 28/08/2024 16:32, Andrew Lunn wrote:
On Wed, Aug 28, 2024 at 11:23:30AM +0800, Jinjie Ruan wrote:
quoted
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
It is code readability so quite subjective. Jakub also rejected one of
such __free() changes, so maybe all these cases here should be rejected?
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?
That's interesting, scoped-wrapper. I am afraid we would need quite a
lot of them, though, for every of_get_xxx call.

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help