From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Antoine Tenart <atenart@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
"Andrew Lunn" <andrew@lunn.ch>,
"Jakub Kicinski" <kuba@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Russell King" <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Herve Codina" <herve.codina@bootlin.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Köry Maincent" <kory.maincent@bootlin.com>,
"Jesse Brandeburg" <jesse.brandeburg@intel.com>,
"Marek Behún" <kabel@kernel.org>,
"Piergiorgio Beruto" <piergiorgio.beruto@gmail.com>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
"Nicolò Veronese" <nicveronese@gmail.com>,
"Simon Horman" <horms@kernel.org>,
mwojtas@chromium.org, "Nathan Chancellor" <nathan@kernel.org>
Subject: Re: [PATCH net-next] net: phy: phy_link_topology: Handle NULL topologies
Date: Fri, 12 Apr 2024 15:16:48 +0200 [thread overview]
Message-ID: <20240412151648.653d41be@device-28.home> (raw)
In-Reply-To: <171292699033.4917.4025686054785818967@kwain>
Hi Antoine,
On Fri, 12 Apr 2024 15:03:10 +0200
Antoine Tenart <atenart@kernel.org> wrote:
> Hi Maxime,
>
> Quoting Maxime Chevallier (2024-04-12 12:46:14)
> >
> > This patch fixes a commit that is in net-next, hence the net-next tag and the
> > lack of "Fixes" tag.
>
> You can use Fixes: on net-next, that still helps to identify which
> commit is being fixed (eg. for reviews, while looking at the history,
> etc).
Won't the tag become invalid when the commit gets merged into an -rc
release then ?
>
> > diff --git a/drivers/net/phy/phy_link_topology.c b/drivers/net/phy/phy_link_topology.c
> > index 985941c5c558..0f3973f07fac 100644
> > --- a/drivers/net/phy/phy_link_topology.c
> > +++ b/drivers/net/phy/phy_link_topology.c
> > @@ -42,6 +42,9 @@ int phy_link_topo_add_phy(struct phy_link_topology *topo,
> > struct phy_device_node *pdn;
> > int ret;
> >
> > + if (!topo)
> > + return 0;
> > +
>
> With that phy_sfp_connect_phy does not need to check the topo validity
> before calling phy_link_topo_add_phy. The other way around is fine too.
>
> > @@ -93,7 +96,12 @@ EXPORT_SYMBOL_GPL(phy_link_topo_add_phy);
> > void phy_link_topo_del_phy(struct phy_link_topology *topo,
> > struct phy_device *phy)
> > {
> > - struct phy_device_node *pdn = xa_erase(&topo->phys, phy->phyindex);
> > + struct phy_device_node *pdn;
> > +
> > + if (!topo)
> > + return;
> > +
> > + pdn = xa_erase(&topo->phys, phy->phyindex);
>
> Same here with phy_sfp_disconnect_phy.
Ah right, well spotted, thanks !
Maxime
>
> Thanks!
> Antoine
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-04-12 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 10:46 [PATCH net-next] net: phy: phy_link_topology: Handle NULL topologies Maxime Chevallier
2024-04-12 11:35 ` Heiner Kallweit
2024-04-12 13:03 ` Antoine Tenart
2024-04-12 13:16 ` Maxime Chevallier [this message]
2024-04-12 13:20 ` Antoine Tenart
2024-04-12 13:07 ` Heiner Kallweit
2024-04-12 13:23 ` Maxime Chevallier
2024-04-27 19:34 ` Heiner Kallweit
2024-04-29 11:55 ` Maxime Chevallier
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=20240412151648.653d41be@device-28.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=atenart@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=herve.codina@bootlin.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=jesse.brandeburg@intel.com \
--cc=kabel@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mwojtas@chromium.org \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicveronese@gmail.com \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=piergiorgio.beruto@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.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;
as well as URLs for NNTP newsgroup(s).