* [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
@ 2026-04-02 14:58 Julian Braha
2026-04-03 23:10 ` patchwork-bot+netdevbpf
2026-04-06 8:23 ` Geert Uytterhoeven
0 siblings, 2 replies; 6+ messages in thread
From: Julian Braha @ 2026-04-02 14:58 UTC (permalink / raw)
To: davem, peppe.cavallaro, alexandre.torgue, mcoquelin.stm32, linux,
kuba
Cc: netdev, linux-arm-kernel, linux-kernel, Julian Braha,
Russell King (Oracle)
There are already 'if STMMAC_ETH' and 'STMMAC_PLATFORM'
conditions wrapping these config options, making the
'depends on' statements duplicate dependencies (dead code).
I propose leaving the outer 'if STMMAC_PLATFORM...endif' and
'if STMMAC_ETH...endif' conditions, and removing the
individual 'depends on' statements.
This dead code was found by kconfirm, a static analysis tool for Kconfig.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
v2: add back default STMMAC_PLATFORM for DWMAC_GENERIC
Link to v1: https://lore.kernel.org/all/20260331125817.117091-1-julianbraha@gmail.com/
---
drivers/net/ethernet/stmicro/stmmac/Kconfig | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index c2cb530fd0a2..e3dd5adda5ac 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -20,7 +20,6 @@ if STMMAC_ETH
config STMMAC_SELFTESTS
bool "Support for STMMAC Selftests"
depends on INET
- depends on STMMAC_ETH
default n
help
This adds support for STMMAC Selftests using ethtool. Enable this
@@ -29,7 +28,6 @@ config STMMAC_SELFTESTS
config STMMAC_PLATFORM
tristate "STMMAC Platform bus support"
- depends on STMMAC_ETH
select MFD_SYSCON
default y
help
@@ -336,7 +334,6 @@ config DWMAC_IMX8
config DWMAC_INTEL_PLAT
tristate "Intel dwmac support"
depends on OF && COMMON_CLK
- depends on STMMAC_ETH
help
Support for ethernet controllers on Intel SoCs
@@ -371,7 +368,7 @@ config DWMAC_VISCONTI
help
Support for ethernet controller on Visconti SoCs.
-endif
+endif # STMMAC_PLATFORM
config STMMAC_LIBPCI
tristate
@@ -381,7 +378,7 @@ config STMMAC_LIBPCI
config DWMAC_INTEL
tristate "Intel GMAC support"
default X86
- depends on X86 && STMMAC_ETH && PCI
+ depends on X86 && PCI
depends on COMMON_CLK
depends on ACPI
help
@@ -420,4 +417,4 @@ config STMMAC_PCI
If you have a controller with this interface, say Y or M here.
If unsure, say N.
-endif
+endif # STMMAC_ETH
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
2026-04-02 14:58 [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig Julian Braha
@ 2026-04-03 23:10 ` patchwork-bot+netdevbpf
2026-04-06 8:23 ` Geert Uytterhoeven
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-03 23:10 UTC (permalink / raw)
To: Julian Braha
Cc: davem, peppe.cavallaro, alexandre.torgue, mcoquelin.stm32, linux,
kuba, netdev, linux-arm-kernel, linux-kernel, rmk+kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 2 Apr 2026 15:58:58 +0100 you wrote:
> There are already 'if STMMAC_ETH' and 'STMMAC_PLATFORM'
> conditions wrapping these config options, making the
> 'depends on' statements duplicate dependencies (dead code).
>
> I propose leaving the outer 'if STMMAC_PLATFORM...endif' and
> 'if STMMAC_ETH...endif' conditions, and removing the
> individual 'depends on' statements.
>
> [...]
Here is the summary with links:
- [v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
https://git.kernel.org/netdev/net-next/c/e2f152c822cf
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] 6+ messages in thread
* Re: [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
2026-04-02 14:58 [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig Julian Braha
2026-04-03 23:10 ` patchwork-bot+netdevbpf
@ 2026-04-06 8:23 ` Geert Uytterhoeven
2026-04-06 9:27 ` Julian Braha
2026-04-06 15:39 ` Jakub Kicinski
1 sibling, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2026-04-06 8:23 UTC (permalink / raw)
To: Julian Braha
Cc: davem, peppe.cavallaro, alexandre.torgue, mcoquelin.stm32, linux,
kuba, netdev, linux-arm-kernel, linux-kernel,
Russell King (Oracle)
Hi Julian,
On Thu, 2 Apr 2026 at 17:07, Julian Braha <julianbraha@gmail.com> wrote:
> There are already 'if STMMAC_ETH' and 'STMMAC_PLATFORM'
> conditions wrapping these config options, making the
> 'depends on' statements duplicate dependencies (dead code).
>
> I propose leaving the outer 'if STMMAC_PLATFORM...endif' and
> 'if STMMAC_ETH...endif' conditions, and removing the
> individual 'depends on' statements.
>
> This dead code was found by kconfirm, a static analysis tool for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> v2: add back default STMMAC_PLATFORM for DWMAC_GENERIC
> Link to v1: https://lore.kernel.org/all/20260331125817.117091-1-julianbraha@gmail.com/
Thanks for your patch, which is now commit e2f152c822cf5d37 ("stmmac:
cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in
Kconfig") in net-next.
> --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
> +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
> @@ -20,7 +20,6 @@ if STMMAC_ETH
> config STMMAC_SELFTESTS
> bool "Support for STMMAC Selftests"
> depends on INET
> - depends on STMMAC_ETH
> default n
> help
> This adds support for STMMAC Selftests using ethtool. Enable this
> @@ -29,7 +28,6 @@ config STMMAC_SELFTESTS
>
> config STMMAC_PLATFORM
> tristate "STMMAC Platform bus support"
> - depends on STMMAC_ETH
> select MFD_SYSCON
> default y
This now lets us have STMMAC_PLATFORM=y and STMMAC_ETH=m.
Does that actually link?
> help
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
2026-04-06 8:23 ` Geert Uytterhoeven
@ 2026-04-06 9:27 ` Julian Braha
2026-04-06 9:40 ` Geert Uytterhoeven
2026-04-06 15:39 ` Jakub Kicinski
1 sibling, 1 reply; 6+ messages in thread
From: Julian Braha @ 2026-04-06 9:27 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: davem, peppe.cavallaro, alexandre.torgue, mcoquelin.stm32, linux,
kuba, netdev, linux-arm-kernel, linux-kernel,
Russell King (Oracle)
Hi Geert,
With the patch applied, I've attempted to configure the kernel
with STMMAC_PLATFORM=y while STMMAC_ETH=m but menuconfig gives this
error message:
"This feature depends on another which has been configured as a module.
As a result, this feature will be built as a module."
So it looks to me like this patch hasn't actually changed any kconfig
behavior, but let me know if I'm missing something.
Best regards,
Julian Braha
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
2026-04-06 9:27 ` Julian Braha
@ 2026-04-06 9:40 ` Geert Uytterhoeven
0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2026-04-06 9:40 UTC (permalink / raw)
To: Julian Braha
Cc: davem, peppe.cavallaro, alexandre.torgue, mcoquelin.stm32, linux,
kuba, netdev, linux-arm-kernel, linux-kernel,
Russell King (Oracle)
Hi Julian,
On Mon, 6 Apr 2026 at 11:27, Julian Braha <julianbraha@gmail.com> wrote:
> With the patch applied, I've attempted to configure the kernel
> with STMMAC_PLATFORM=y while STMMAC_ETH=m but menuconfig gives this
> error message:
> "This feature depends on another which has been configured as a module.
> As a result, this feature will be built as a module."
>
> So it looks to me like this patch hasn't actually changed any kconfig
> behavior, but let me know if I'm missing something.
OK, thanks for checking!
I thought there was still some difference between "if" and "depends on"
when the symbol is a module, but apparently I was wrong...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
2026-04-06 8:23 ` Geert Uytterhoeven
2026-04-06 9:27 ` Julian Braha
@ 2026-04-06 15:39 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2026-04-06 15:39 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Julian Braha, davem, peppe.cavallaro, alexandre.torgue,
mcoquelin.stm32, linux, netdev, linux-arm-kernel, linux-kernel,
Russell King (Oracle)
On Mon, 6 Apr 2026 10:23:46 +0200 Geert Uytterhoeven wrote:
> > config STMMAC_PLATFORM
> > tristate "STMMAC Platform bus support"
> > - depends on STMMAC_ETH
> > select MFD_SYSCON
> > default y
>
> This now lets us have STMMAC_PLATFORM=y and STMMAC_ETH=m.
> Does that actually link?
Hm. Sashiko didn't complain when patch was posted.
Typical LLM indeterminism?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-04-06 15:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 14:58 [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig Julian Braha
2026-04-03 23:10 ` patchwork-bot+netdevbpf
2026-04-06 8:23 ` Geert Uytterhoeven
2026-04-06 9:27 ` Julian Braha
2026-04-06 9:40 ` Geert Uytterhoeven
2026-04-06 15:39 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox