All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: declare package-related struct members only if CONFIG_PHY_PACKAGE is enabled
@ 2025-07-03  5:55 Heiner Kallweit
  2025-07-08 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2025-07-03  5:55 UTC (permalink / raw)
  To: Andrew Lunn, Russell King - ARM Linux, Paolo Abeni, Eric Dumazet,
	David Miller, Jakub Kicinski
  Cc: netdev@vger.kernel.org

Now that we have an own config symbol for the PHY package module,
we can use it to reduce size of these structs if it isn't enabled.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/linux/phy.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 74c1bcf64..543a94751 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -409,8 +409,10 @@ struct mii_bus {
 	/** @shared_lock: protect access to the shared element */
 	struct mutex shared_lock;
 
+#if IS_ENABLED(CONFIG_PHY_PACKAGE)
 	/** @shared: shared state across different PHYs */
 	struct phy_package_shared *shared[PHY_MAX_ADDR];
+#endif
 };
 #define to_mii_bus(d) container_of(d, struct mii_bus, dev)
 
@@ -718,9 +720,11 @@ struct phy_device {
 	/* For use by PHYs to maintain extra state */
 	void *priv;
 
+#if IS_ENABLED(CONFIG_PHY_PACKAGE)
 	/* shared data pointer */
 	/* For use by PHYs inside the same package that need a shared state. */
 	struct phy_package_shared *shared;
+#endif
 
 	/* Reporting cable test results */
 	struct sk_buff *skb;
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-08 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03  5:55 [PATCH net-next] net: phy: declare package-related struct members only if CONFIG_PHY_PACKAGE is enabled Heiner Kallweit
2025-07-08 16:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.