[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6092e318-ae0c-44f6-89fa-989a384921b7@lunn.ch>
Date: Wed, 28 Aug 2024 16:32:05 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: woojung.huh@...rochip.com, f.fainelli@...il.com, olteanv@...il.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, linus.walleij@...aro.org, alsi@...g-olufsen.dk,
justin.chen@...adcom.com, sebastian.hesselbarth@...il.com,
alexandre.torgue@...s.st.com, joabreu@...opsys.com,
mcoquelin.stm32@...il.com, wens@...e.org, jernej.skrabec@...il.com,
samuel@...lland.org, hkallweit1@...il.com, linux@...linux.org.uk,
ansuelsmth@...il.com, UNGLinuxDriver@...rochip.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
linux-stm32@...md-mailman.stormreply.com, krzk@...nel.org,
jic23@...nel.org
Subject: Re: [PATCH net-next v2 00/13] net: Simplified with scoped function
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
Powered by blists - more mailing lists