linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: mediatek: fix compile-test dependencies
@ 2023-06-16  9:29 Arnd Bergmann
  2023-06-16 11:47 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-06-16  9:29 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Arnd Bergmann, Russell King, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Ramón Nordin Rodriguez,
	Parthiban Veerasooran, Frank Sae, Michael Walle, Daniel Golle,
	Piergiorgio Beruto, Vladimir Oltean, Jonathan Lemon, Randy Dunlap,
	netdev, linux-kernel, linux-arm-kernel, linux-mediatek

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index a40269c175974..78e6981650d94 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -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.
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] net: phy: mediatek: fix compile-test dependencies
  2023-06-16  9:29 [PATCH] net: phy: mediatek: fix compile-test dependencies Arnd Bergmann
@ 2023-06-16 11:47 ` Simon Horman
  2023-06-17 22:26   ` Daniel Golle
  2023-06-17  4:35 ` Randy Dunlap
  2023-06-20 19:10 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2023-06-16 11:47 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Lunn, Heiner Kallweit, Arnd Bergmann, Russell King,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Matthias Brugger, AngeloGioacchino Del Regno,
	Ramón Nordin Rodriguez, Parthiban Veerasooran, Frank Sae,
	Michael Walle, Daniel Golle, Piergiorgio Beruto, Vladimir Oltean,
	Jonathan Lemon, Randy Dunlap, netdev, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Fri, Jun 16, 2023 at 11:29:54AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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

nit: for for -> for
     or
     for for working correctly -> for correct operation

> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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: Simon Horman <simon.horman@corigine.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] net: phy: mediatek: fix compile-test dependencies
  2023-06-16  9:29 [PATCH] net: phy: mediatek: fix compile-test dependencies Arnd Bergmann
  2023-06-16 11:47 ` Simon Horman
@ 2023-06-17  4:35 ` Randy Dunlap
  2023-06-20 19:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2023-06-17  4:35 UTC (permalink / raw)
  To: Arnd Bergmann, Andrew Lunn, Heiner Kallweit
  Cc: Arnd Bergmann, Russell King, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno, Ramón Nordin Rodriguez,
	Parthiban Veerasooran, Frank Sae, Michael Walle, Daniel Golle,
	Piergiorgio Beruto, Vladimir Oltean, Jonathan Lemon, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek



On 6/16/23 02:29, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/net/phy/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
> index a40269c175974..78e6981650d94 100644
> --- a/drivers/net/phy/Kconfig
> +++ b/drivers/net/phy/Kconfig
> @@ -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.
>  

-- 
~Randy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] net: phy: mediatek: fix compile-test dependencies
  2023-06-16 11:47 ` Simon Horman
@ 2023-06-17 22:26   ` Daniel Golle
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Golle @ 2023-06-17 22:26 UTC (permalink / raw)
  To: Simon Horman
  Cc: Arnd Bergmann, Andrew Lunn, Heiner Kallweit, Arnd Bergmann,
	Russell King, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno,
	Ramón Nordin Rodriguez, Parthiban Veerasooran, Frank Sae,
	Michael Walle, Piergiorgio Beruto, Vladimir Oltean,
	Jonathan Lemon, Randy Dunlap, netdev, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Fri, Jun 16, 2023 at 01:47:35PM +0200, Simon Horman wrote:
> On Fri, Jun 16, 2023 at 11:29:54AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > 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
> 
> nit: for for -> for
>      or
>      for for working correctly -> for correct operation
> 
> > 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")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> 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.

Reviewed-by: Daniel Golle <daniel@makrotopia.org>

> 
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] net: phy: mediatek: fix compile-test dependencies
  2023-06-16  9:29 [PATCH] net: phy: mediatek: fix compile-test dependencies Arnd Bergmann
  2023-06-16 11:47 ` Simon Horman
  2023-06-17  4:35 ` Randy Dunlap
@ 2023-06-20 19:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-20 19:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: andrew, hkallweit1, arnd, linux, davem, edumazet, kuba, pabeni,
	matthias.bgg, angelogioacchino.delregno, ramon.nordin.rodriguez,
	Parthiban.Veerasooran, Frank.Sae, michael, daniel,
	piergiorgio.beruto, vladimir.oltean, jonathan.lemon, rdunlap,
	netdev, linux-kernel, linux-arm-kernel, linux-mediatek

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 16 Jun 2023 11:29:54 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-06-20 19:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16  9:29 [PATCH] net: phy: mediatek: fix compile-test dependencies Arnd Bergmann
2023-06-16 11:47 ` Simon Horman
2023-06-17 22:26   ` Daniel Golle
2023-06-17  4:35 ` Randy Dunlap
2023-06-20 19:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).