[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xq3ittuw6mqwfi65nj6envt3y43k5zb4mqo43jqdy5v5zf5smm@k6j2s45v35pf>
Date: Thu, 4 Jan 2024 15:59:52 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Andrew Lunn
<andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>, Luiz Angelo Daros
de Luca <luizluca@...il.com>, Linus Walleij <linus.walleij@...aro.org>,
Florian Fainelli <florian.fainelli@...adcom.com>, Hauke Mehrtens
<hauke@...ke-m.de>, Christian Marangi <ansuelsmth@...il.com>,
Arınç ÜNAL <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next 10/10] net: dsa: bcm_sf2: drop
priv->master_mii_dn
On Thu, Jan 04, 2024 at 04:00:37PM +0200, Vladimir Oltean wrote:
> There used to be a of_node_put(priv->master_mii_dn) call in
> bcm_sf2_mdio_unregister(), which was accidentally deleted in commit
> 6ca80638b90c ("net: dsa: Use conduit and user terms").
>
> But it's not needed - we don't need to hold a reference on the
> "brcm,unimac-mdio" OF node for that long, since we don't do anything
> with it. We can release it as soon as we finish bcm_sf2_mdio_register().
>
> Also reduce "if (err && dn)" to just "if (err)". We know "dn", aka the
> former priv->master_mii_dn, is non-NULL. Otherwise, of_mdio_find_bus(dn)
> would not have been able to find the bus behind "brcm,unimac-mdio".
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
Reviewed-by: Alvin Šipraga <alsi@...g-olufsen.dk>
> ---
> drivers/net/dsa/bcm_sf2.c | 6 +++---
> drivers/net/dsa/bcm_sf2.h | 1 -
> 2 files changed, 3 insertions(+), 4 deletions(-)
Powered by blists - more mailing lists