Skip to contentSkip to conversation

net: phy: mediatek: fix compile-test dependencies

PATCH Applied Arnd Bergmann 5 participants 5 messages Jun 16, 2023 – Jun 20, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: mediatek: fix compile-test dependencies

From: Arnd Bergmann <[email protected]>

The new phy driver attempts to select a driver from another subsystem, but that fails when the NVMEM subsystem is disabled:

WARNING: unmet direct dependencies detected for NVMEM_MTK_EFUSE
Depends on [n]: NVMEM [=n] && (ARCH_MEDIATEK [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- MEDIATEK_GE_SOC_PHY [=y] && NETDEVICES [=y] && PHYLIB [=y] && (ARM64 && ARCH_MEDIATEK [=n] || COMPILE_TEST [=y])

I could not see an actual compile time dependency, so presumably this is only needed for for working correctly but not technically a dependency on that particular nvmem driver implementation, so it would likely be safe to remove the select for compile testing.

To keep the spirit of the original 'select', just replace this with a 'depends on' that ensures that the driver will work but does not get in the way of build testing.

Fixes 98c485eaf509b ("net: phy: add driver for MediaTek SoC built-in GE PHYs")
---
 drivers/net/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/Kconfig +1 -1
index a40269c175974..78e6981650d94 100644
@@ -239,7 +239,7 @@ config MEDIATEK_GE_PHY
 config MEDIATEK_GE_SOC_PHY
 	tristate "MediaTek SoC Ethernet PHYs"
 	depends on (ARM64 && ARCH_MEDIATEK) || COMPILE_TEST
-	select NVMEM_MTK_EFUSE
+	depends on NVMEM_MTK_EFUSE
 	help
 	  Supports MediaTek SoC built-in Gigabit Ethernet PHYs.
 
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The new phy driver attempts to select a driver from another subsystem, but that fails when the NVMEM subsystem is disabled:

Quoted 7 lines

WARNING: unmet direct dependencies detected for NVMEM_MTK_EFUSE
Depends on [n]: NVMEM [=n] && (ARCH_MEDIATEK [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- MEDIATEK_GE_SOC_PHY [=y] && NETDEVICES [=y] && PHYLIB [=y] && (ARM64 && ARCH_MEDIATEK [=n] || COMPILE_TEST [=y])

I could not see an actual compile time dependency, so presumably this is only needed for for working correctly but not technically a dependency

nit: for for -> for

     or
     for for working correctly -> for correct operation
Quoted 9 lines

on that particular nvmem driver implementation, so it would likely be safe to remove the select for compile testing.

To keep the spirit of the original 'select', just replace this with a 'depends on' that ensures that the driver will work but does not get in the way of build testing.

Fixes 98c485eaf509b ("net: phy: add driver for MediaTek SoC built-in GE PHYs")

I don't know the answer to the question of if this dependency is needed or not. But I do agree that it does what it says on the box.

Reviewed-by
#2 lore raw
Quoted 25 lines · Simon Horman
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The new phy driver attempts to select a driver from another subsystem, but that fails when the NVMEM subsystem is disabled:

Quoted 7 lines

WARNING: unmet direct dependencies detected for NVMEM_MTK_EFUSE
Depends on [n]: NVMEM [=n] && (ARCH_MEDIATEK [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- MEDIATEK_GE_SOC_PHY [=y] && NETDEVICES [=y] && PHYLIB [=y] && (ARM64 && ARCH_MEDIATEK [=n] || COMPILE_TEST [=y])

I could not see an actual compile time dependency, so presumably this is only needed for for working correctly but not technically a dependency

nit: for for -> for

     or
     for for working correctly -> for correct operation
Quoted 7 lines

on that particular nvmem driver implementation, so it would likely be safe to remove the select for compile testing.

To keep the spirit of the original 'select', just replace this with a 'depends on' that ensures that the driver will work but does not get in the way of build testing.

Quoted 5 lines
Quoted 2 lines
Fixes 98c485eaf509b ("net: phy: add driver for MediaTek SoC built-in GE PHYs")

I don't know the answer to the question of if this dependency is needed or not. But I do agree that it does what it says on the box.

It's not needed to build or load the driver, but the PHY won't function at all without reading values from the SoCs efuse, and for that the nvmem driver is required.

Using a simple dependency instead of select will fix it.

Quoted 4 lines
Acked-by Tested-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 15 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The new phy driver attempts to select a driver from another subsystem, but that fails when the NVMEM subsystem is disabled:

WARNING: unmet direct dependencies detected for NVMEM_MTK_EFUSE
Depends on [n]: NVMEM [=n] && (ARCH_MEDIATEK [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- MEDIATEK_GE_SOC_PHY [=y] && NETDEVICES [=y] && PHYLIB [=y] && (ARM64 && ARCH_MEDIATEK [=n] || COMPILE_TEST [=y])

I could not see an actual compile time dependency, so presumably this is only needed for for working correctly but not technically a dependency on that particular nvmem driver implementation, so it would likely be safe to remove the select for compile testing.

Quoted 6 lines

To keep the spirit of the original 'select', just replace this with a 'depends on' that ensures that the driver will work but does not get in the way of build testing.

Fixes 98c485eaf509b ("net: phy: add driver for MediaTek SoC built-in GE PHYs")

Thanks.

Quoted 17 lines
---
 drivers/net/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/Kconfig +1 -1
index a40269c175974..78e6981650d94 100644
@@ -239,7 +239,7 @@ config MEDIATEK_GE_PHY
 config MEDIATEK_GE_SOC_PHY
 	tristate "MediaTek SoC Ethernet PHYs"
 	depends on (ARM64 && ARCH_MEDIATEK) || COMPILE_TEST
-	select NVMEM_MTK_EFUSE
+	depends on NVMEM_MTK_EFUSE
 	help
 	  Supports MediaTek SoC built-in Gigabit Ethernet PHYs.
 
Signature · 1 line
~Randy
#4 lore raw
In reply to Arnd Bergmann
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Fri, 16 Jun 2023 11:29:54 +0200 you wrote:

From: Arnd Bergmann <[email protected]>

The new phy driver attempts to select a driver from another subsystem, but that fails when the NVMEM subsystem is disabled:

WARNING: unmet direct dependencies detected for NVMEM_MTK_EFUSE
Depends on [n]: NVMEM [=n] && (ARCH_MEDIATEK [=n] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]:
- MEDIATEK_GE_SOC_PHY [=y] && NETDEVICES [=y] && PHYLIB [=y] && (ARM64 && ARCH_MEDIATEK [=n] || COMPILE_TEST [=y])

[...]

Here is the summary with links:
- net: phy: mediatek: fix compile-test dependencies

    https://git.kernel.org/netdev/net-next/c/462a3daad679

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html