Re: [PATCH v2] stmmac: cleanup dead dependencies on STMMAC_PLATFORM and STMMAC_ETH in Kconfig
From: Geert Uytterhoeven
Date: Mon Apr 06 2026 - 04:24:06 EST
Hi Julian,
On Thu, 2 Apr 2026 at 17:07, Julian Braha <julianbraha@xxxxxxxxx> 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@xxxxxxxxx>
> Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
> ---
> v2: add back default STMMAC_PLATFORM for DWMAC_GENERIC
> Link to v1: https://lore.kernel.org/all/20260331125817.117091-1-julianbraha@xxxxxxxxx/
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@xxxxxxxxxxxxxx
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