lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5fbe123d-99d1-1b48-4c84-fe8e1b0cf109@huawei.com>
Date: Thu, 29 Aug 2024 10:29:33 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: Andrew Lunn <andrew@...n.ch>
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 01/13] net: stmmac: dwmac-sun8i: Use
 for_each_child_of_node_scoped()



On 2024/8/28 22:17, Andrew Lunn wrote:
> On Wed, Aug 28, 2024 at 11:23:31AM +0800, Jinjie Ruan wrote:
>> Avoid need to manually handle of_node_put() by using
>> for_each_child_of_node_scoped(), which can simplfy code.
>>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
>> ---
>>  drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>> index cc93f73a380e..8c5b4e0c0976 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>> @@ -774,7 +774,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv)
>>  static int get_ephy_nodes(struct stmmac_priv *priv)
>>  {
>>  	struct sunxi_priv_data *gmac = priv->plat->bsp_priv;
>> -	struct device_node *mdio_mux, *iphynode;
>> +	struct device_node *mdio_mux;
>>  	struct device_node *mdio_internal;
>>  	int ret;
> 
> Networking uses reverse Christmas tree. Variables are sorted, longest
> first, shortest last. So you need to move mdio_mux after
> mdio_internal.

Right, it will look more clear.

> 
> The rest looks O.K.
> 
> 
>     Andrew
> 
> ---
> pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ