[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240417142707.2082523-1-maxime.chevallier@bootlin.com>
Date: Wed, 17 Apr 2024 16:27:05 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: davem@...emloft.net
Cc: Maxime Chevallier <maxime.chevallier@...tlin.com>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com,
Andrew Lunn <andrew@...n.ch>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Herve Codina <herve.codina@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Köry Maincent <kory.maincent@...tlin.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Marek Behún <kabel@...nel.org>,
Piergiorgio Beruto <piergiorgio.beruto@...il.com>,
Oleksij Rempel <o.rempel@...gutronix.de>,
Nicolò Veronese <nicveronese@...il.com>,
Simon Horman <horms@...nel.org>,
mwojtas@...omium.org,
Nathan Chancellor <nathan@...nel.org>,
Antoine Tenart <atenart@...nel.org>
Subject: [PATCH net-next] net: phy: link_topology: Don't stub-away the topology creation
Some of the phy_link_topology operations are protected by IS_REACHABLE,
which can lead to scenarios where the consumer, built as modules, sees the topology
unstubbed, whereas the initialization didn't occur.
Don't stub away the creation of the topology, it has no dependency on
any other parts like phylib, so we can make it always available.
Signed-off-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
Closes: https://lore.kernel.org/netdev/2e11b89d-100f-49e7-9c9a-834cc0b82f97@gmail.com/
Closes: https://lore.kernel.org/netdev/20240409201553.GA4124869@dev-arch.thelio-3990X/
---
Hi Nathan, Heiner,
I'm currently at EOSS, so I'm sending this patch without having been
able to properly test it (build-tested only), but as this addresses an
issue for people using -next, I'm sending this anyway, sorry about that.
Hopefully it can address the issue for now, I haven't given-up on your
idea to introduce a config option Heiner :)
Thanks,
Maxime
include/linux/phy_link_topology_core.h | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/include/linux/phy_link_topology_core.h b/include/linux/phy_link_topology_core.h
index 0a6479055745..61e2592f24ac 100644
--- a/include/linux/phy_link_topology_core.h
+++ b/include/linux/phy_link_topology_core.h
@@ -4,22 +4,7 @@
struct phy_link_topology;
-#if IS_REACHABLE(CONFIG_PHYLIB)
-
struct phy_link_topology *phy_link_topo_create(struct net_device *dev);
void phy_link_topo_destroy(struct phy_link_topology *topo);
-#else
-
-static inline struct phy_link_topology *phy_link_topo_create(struct net_device *dev)
-{
- return NULL;
-}
-
-static inline void phy_link_topo_destroy(struct phy_link_topology *topo)
-{
-}
-
-#endif
-
#endif /* __PHY_LINK_TOPOLOGY_CORE_H */
--
2.44.0
Powered by blists - more mailing lists