[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71deb322-4b54-4c1c-a665-d9de84ea9baf@kernel.org>
Date: Wed, 28 Aug 2024 16:45:32 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Andrew Lunn <andrew@...n.ch>, 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, jic23@...nel.org
Subject: Re: [PATCH net-next v2 00/13] net: Simplified with scoped function
On 28/08/2024 16:32, Andrew Lunn wrote:
> 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
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
Powered by blists - more mailing lists