From: Andrew Lunn <andrew@lunn.ch>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: woojung.huh@microchip.com, f.fainelli@gmail.com,
olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linus.walleij@linaro.org,
alsi@bang-olufsen.dk, justin.chen@broadcom.com,
sebastian.hesselbarth@gmail.com, alexandre.torgue@foss.st.com,
joabreu@synopsys.com, mcoquelin.stm32@gmail.com, wens@csie.org,
jernej.skrabec@gmail.com, samuel@sholland.org,
hkallweit1@gmail.com, linux@armlinux.org.uk,
ansuelsmth@gmail.com, UNGLinuxDriver@microchip.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev,
linux-stm32@st-md-mailman.stormreply.com, krzk@kernel.org,
jic23@kernel.org
Subject: Re: [PATCH -next 1/7] net: stmmac: dwmac-sun8i: Use for_each_child_of_node_scoped() and __free()
Date: Tue, 27 Aug 2024 14:52:59 +0200 [thread overview]
Message-ID: <804da030-ff7e-4bf2-84f8-2784fc93e9e8@lunn.ch> (raw)
In-Reply-To: <20240827075219.3793198-2-ruanjinjie@huawei.com>
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
next prev parent reply other threads:[~2024-08-27 12:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 7:52 [PATCH -next 0/7] net: Simplified with scoped function Jinjie Ruan
2024-08-27 7:52 ` [PATCH -next 1/7] net: stmmac: dwmac-sun8i: Use for_each_child_of_node_scoped() and __free() Jinjie Ruan
2024-08-27 12:52 ` Andrew Lunn [this message]
2024-08-28 1:59 ` Jinjie Ruan
2024-08-27 7:52 ` [PATCH -next 2/7] net: dsa: realtek: " Jinjie Ruan
2024-08-30 22:17 ` Linus Walleij
2024-08-27 7:52 ` [PATCH -next 3/7] net: phy: Fix missing of_node_put() for leds Jinjie Ruan
2024-08-27 7:52 ` [PATCH -next 4/7] net: mdio: mux-mmioreg: Simplified with scoped function and dev_err_probe() Jinjie Ruan
2024-08-27 7:52 ` [PATCH -next 5/7] net: mv643xx_eth: Simplify with scoped for each OF child loop Jinjie Ruan
2024-08-27 7:52 ` [PATCH -next 6/7] net: dsa: microchip: Use scoped function and __free() to simplfy code Jinjie Ruan
2024-08-27 7:52 ` [PATCH -next 7/7] net: bcmasp: Simplify with scoped for each OF child loop Jinjie Ruan
2024-08-27 12:44 ` [PATCH -next 0/7] net: Simplified with scoped function Andrew Lunn
2024-08-28 1:59 ` Jinjie Ruan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=804da030-ff7e-4bf2-84f8-2784fc93e9e8@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alsi@bang-olufsen.dk \
--cc=ansuelsmth@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=jic23@kernel.org \
--cc=joabreu@synopsys.com \
--cc=justin.chen@broadcom.com \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=ruanjinjie@huawei.com \
--cc=samuel@sholland.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=wens@csie.org \
--cc=woojung.huh@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox