diff mbox series

net: dsa: qca8k: fix LEDS_CLASS dependency

Message ID 20230420213639.2243388-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit 33c1af8e2c75ab601524e25efeeed0173d703ce7
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: qca8k: fix LEDS_CLASS dependency | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arnd Bergmann April 20, 2023, 9:36 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

With LEDS_CLASS=m, a built-in qca8k driver fails to link:

arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl':
qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext'

Change the dependency to avoid the broken configuration.

Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/dsa/qca/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Marangi April 20, 2023, 12:13 p.m. UTC | #1
On Thu, Apr 20, 2023 at 11:36:31PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With LEDS_CLASS=m, a built-in qca8k driver fails to link:
> 
> arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl':
> qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext'
> 
> Change the dependency to avoid the broken configuration.
> 
> Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks a lot for the fix and sorry for the mess...
LED_CLASS and PHY releated were really hell also for some reason this
didn't got flagged in month of this series.

Again thanks for handling this!
Christian Marangi April 20, 2023, 6:59 p.m. UTC | #2
On Thu, Apr 20, 2023 at 11:36:31PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With LEDS_CLASS=m, a built-in qca8k driver fails to link:
> 
> arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl':
> qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext'
> 
> Change the dependency to avoid the broken configuration.
> 
> Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Christian Marangi <ansuelsmth@gmail.com>
Andrew Lunn April 21, 2023, 12:46 p.m. UTC | #3
On Thu, Apr 20, 2023 at 11:36:31PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With LEDS_CLASS=m, a built-in qca8k driver fails to link:
> 
> arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl':
> qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext'
> 
> Change the dependency to avoid the broken configuration.
> 
> Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
patchwork-bot+netdevbpf@kernel.org April 22, 2023, 3:30 a.m. UTC | #4
Hello:

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

On Thu, 20 Apr 2023 23:36:31 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> With LEDS_CLASS=m, a built-in qca8k driver fails to link:
> 
> arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl':
> qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext'
> 
> [...]

Here is the summary with links:
  - net: dsa: qca8k: fix LEDS_CLASS dependency
    https://git.kernel.org/netdev/net-next/c/33c1af8e2c75

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/qca/Kconfig b/drivers/net/dsa/qca/Kconfig
index 7a86d6d6a246..4347b42c50fd 100644
--- a/drivers/net/dsa/qca/Kconfig
+++ b/drivers/net/dsa/qca/Kconfig
@@ -19,7 +19,7 @@  config NET_DSA_QCA8K
 config NET_DSA_QCA8K_LEDS_SUPPORT
 	bool "Qualcomm Atheros QCA8K Ethernet switch family LEDs support"
 	depends on NET_DSA_QCA8K
-	depends on LEDS_CLASS
+	depends on LEDS_CLASS=y || LEDS_CLASS=NET_DSA_QCA8K
 	help
 	  This enabled support for LEDs present on the Qualcomm Atheros
 	  QCA8K Ethernet switch chips.