Skip to contentSkip to conversation

ath5k: fix building with LEDS=m

PATCH Superseded Arnd Bergmann 4 participants 5 messages Jul 22, 2021 – Sep 20, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath5k: fix building with LEDS=m

From: Arnd Bergmann <[email protected]>

Randconfig builds still show a failure for the ath5k driver, similar to the one that was fixed for ath9k earlier:

WARNING: unmet direct dependencies detected for MAC80211_LEDS
Depends on [n]: NET [=y] && WIRELESS [=y] && MAC80211 [=y] && (LEDS_CLASS [=m]=y || LEDS_CLASS [=m]=MAC80211 [=y]) Selected by [m]:
- ATH5K [=m] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] && (PCI [=y] || ATH25) && MAC80211 [=y]
net/mac80211/led.c: In function 'ieee80211_alloc_led_names':
net/mac80211/led.c:34:22: error: 'struct led_trigger' has no member named 'name'
34 | local->rx_led.name = kasprintf(GFP_KERNEL, "%srx",
| ^

Copying the same logic from my ath9k patch makes this one work as well.

Alternatively, we could just drop the 'select' from both ath5k and ath9k.

Fixes b64acb28da83 ("ath9k: fix build error with LEDS_CLASS=m")
Fixes 72cdab808714 ("ath9k: Do not select MAC80211_LEDS by default")
Fixes 3a078876caee ("ath5k: convert LED code to use mac80211 triggers")
---
 drivers/net/wireless/ath/ath5k/Kconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/wireless/ath/ath5k/Kconfig +1 -3
index f35cd8de228e..6914b37bb0fb 100644
@@ -3,9 +3,7 @@ config ATH5K
 	tristate "Atheros 5xxx wireless cards support"
 	depends on (PCI || ATH25) && MAC80211
 	select ATH_COMMON
-	select MAC80211_LEDS
-	select LEDS_CLASS
-	select NEW_LEDS
+	select MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211
 	select ATH5K_AHB if ATH25
 	select ATH5K_PCI if !ATH25
 	help
Signature · 1 line
2.29.2
#1 lore raw
I love your patch! Yet something to improve:

Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master ath6kl/ath-next v5.14-rc2 next-20210722] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/ath5k-fix-building-with-LEDS-m/20210722-185549
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: mips-gpr_defconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 10.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c460f5a9358fefef32ba77149f41a31dc2eee04f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arnd-Bergmann/ath5k-fix-building-with-LEDS-m/20210722-185549 git checkout c460f5a9358fefef32ba77149f41a31dc2eee04f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_register_led.constprop.0':

>> led.c:(.text+0x58): undefined reference to `led_classdev_register_ext'
   mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_unregister_leds':
>> led.c:(.text+0x1d8): undefined reference to `led_classdev_unregister'
>> mips-linux-ld: led.c:(.text+0x208): undefined reference to `led_classdev_unregister'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#2 lore raw
Quoted 8 lines · kernel test robot

All errors (new ones prefixed by >>):

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_register_led.constprop.0':

Quoted 1 line
Quoted 1 line

led.c:(.text+0x58): undefined reference to `led_classdev_register_ext'

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_unregister_leds':

Quoted 2 lines
Quoted 2 lines

led.c:(.text+0x1d8): undefined reference to `led_classdev_unregister'
mips-linux-ld: led.c:(.text+0x208): undefined reference to `led_classdev_unregister'

Ok, nevermind then, please ignore my patch. I don't see this particular build failure on
my randconfig test box, which probably means I have some other patch applied that
avoids this. I may get back to this in the future but can't figure it out at the moment.

My feeling now is that the 'select' should just be removed entirely, and then we can have an 'if (!IS_ENABLED(CONFIG_MAC80211_LEDS)) return 0;' in ath5k_register_led().

Arnd

#3 lore raw

(oddly linux-wireless was dropped, adding it back in hopes that patchwork sees this)

Quoted 25 lines · Arnd Bergmann
Quoted 11 lines · kernel test robot

All errors (new ones prefixed by >>):

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function
`ath5k_register_led.constprop.0':

Quoted 1 line
Quoted 1 line

led.c:(.text+0x58): undefined reference to `led_classdev_register_ext'

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function
`ath5k_unregister_leds':

Quoted 3 lines
Quoted 3 lines

led.c:(.text+0x1d8): undefined reference to `led_classdev_unregister'
mips-linux-ld: led.c:(.text+0x208): undefined reference to `led_classdev_unregister'

Ok, nevermind then, please ignore my patch. I don't see this particular build failure on
my randconfig test box, which probably means I have some other patch applied that
avoids this. I may get back to this in the future but can't figure it out at the moment.

My feeling now is that the 'select' should just be removed entirely, and then we can have an 'if (!IS_ENABLED(CONFIG_MAC80211_LEDS)) return 0;' in ath5k_register_led().

Arnd

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#4 lore raw
In reply to Arnd Bergmann
Quoted 18 lines · Arnd Bergmann
Quoted 8 lines · kernel test robot

All errors (new ones prefixed by >>):

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_register_led.constprop.0':

Quoted 1 line
Quoted 1 line

led.c:(.text+0x58): undefined reference to `led_classdev_register_ext'

mips-linux-ld: drivers/net/wireless/ath/ath5k/led.o: in function `ath5k_unregister_leds':

Quoted 2 lines
Quoted 2 lines

led.c:(.text+0x1d8): undefined reference to `led_classdev_unregister'
mips-linux-ld: led.c:(.text+0x208): undefined reference to `led_classdev_unregister'

Ok, nevermind then, please ignore my patch. I don't see this particular build failure on
my randconfig test box, which probably means I have some other patch applied that
avoids this. I may get back to this in the future but can't figure it out at the moment.

Quoted 3 lines

My feeling now is that the 'select' should just be removed entirely, and then we can have an 'if (!IS_ENABLED(CONFIG_MAC80211_LEDS)) return 0;' in ath5k_register_led().

I ended up running into the same build failure now, as it turns out that was not related to my setup, it was just really rare for LEDS to be disabled. v2 coming.

Arnd