* [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* Re: [PATCH net-next] net: phy: declare package-related struct members only if CONFIG_PHY_PACKAGE is enabled
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
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-08 16:10 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: andrew, linux, pabeni, edumazet, davem, kuba, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 3 Jul 2025 07:55:52 +0200 you wrote:
> 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(+)
Here is the summary with links:
- [net-next] net: phy: declare package-related struct members only if CONFIG_PHY_PACKAGE is enabled
https://git.kernel.org/netdev/net-next/c/c523058713ab
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [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.