* [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency
@ 2023-02-17 9:59 Arnd Bergmann
2023-02-17 11:50 ` Ping-Ke Shih
2023-02-17 16:31 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2023-02-17 9:59 UTC (permalink / raw)
To: Jes Sorensen, Kalle Valo, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Ping-Ke Shih, Bitterblue Smith
Cc: Arnd Bergmann, linux-wireless, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
rtl8xxxu now unconditionally uses LEDS_CLASS, so a Kconfig dependency
is required to avoid link errors:
aarch64-linux-ld: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.o: in function `rtl8xxxu_disconnect':
rtl8xxxu_core.c:(.text+0x730): undefined reference to `led_classdev_unregister'
ERROR: modpost: "led_classdev_unregister" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined!
ERROR: modpost: "led_classdev_register_ext" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined!
Fixes: 3be01622995b ("wifi: rtl8xxxu: Register the LED and make it blink")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/realtek/rtl8xxxu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/Kconfig b/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
index 091d3ad98093..2eed20b0988c 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
+++ b/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
@@ -5,6 +5,7 @@
config RTL8XXXU
tristate "Realtek 802.11n USB wireless chips support"
depends on MAC80211 && USB
+ depends on LEDS_CLASS
help
This is an alternative driver for various Realtek RTL8XXX
parts written to utilize the Linux mac80211 stack.
--
2.39.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency
2023-02-17 9:59 [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency Arnd Bergmann
@ 2023-02-17 11:50 ` Ping-Ke Shih
2023-02-17 12:17 ` Arnd Bergmann
2023-02-17 16:31 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Ping-Ke Shih @ 2023-02-17 11:50 UTC (permalink / raw)
To: arnd, davem, kvalo, Jes.Sorensen, rtl8821cerfe2, kuba, pabeni, edumazet
Cc: linux-wireless, netdev, linux-kernel, arnd
On Fri, 2023-02-17 at 10:59 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> rtl8xxxu now unconditionally uses LEDS_CLASS, so a Kconfig dependency
> is required to avoid link errors:
>
> aarch64-linux-ld: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.o: in function
> `rtl8xxxu_disconnect':
> rtl8xxxu_core.c:(.text+0x730): undefined reference to `led_classdev_unregister'
>
> ERROR: modpost: "led_classdev_unregister" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko]
> undefined!
> ERROR: modpost: "led_classdev_register_ext" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko]
> undefined!
>
> Fixes: 3be01622995b ("wifi: rtl8xxxu: Register the LED and make it blink")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
> b/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
> index 091d3ad98093..2eed20b0988c 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
> @@ -5,6 +5,7 @@
> config RTL8XXXU
> tristate "Realtek 802.11n USB wireless chips support"
> depends on MAC80211 && USB
> + depends on LEDS_CLASS
With 'depends on', this item will disappear if LEDS_CLASS isn't selected.
Would it use 'select' instead?
Ping-Ke
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency
2023-02-17 11:50 ` Ping-Ke Shih
@ 2023-02-17 12:17 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2023-02-17 12:17 UTC (permalink / raw)
To: Ping-Ke Shih, Arnd Bergmann, David S . Miller, Kalle Valo,
Jes.Sorensen, rtl8821cerfe2, Jakub Kicinski, Paolo Abeni,
Eric Dumazet
Cc: linux-wireless, Netdev, linux-kernel
On Fri, Feb 17, 2023, at 12:50, Ping-Ke Shih wrote:
> On Fri, 2023-02-17 at 10:59 +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
>> b/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
>> index 091d3ad98093..2eed20b0988c 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/Kconfig
>> @@ -5,6 +5,7 @@
>> config RTL8XXXU
>> tristate "Realtek 802.11n USB wireless chips support"
>> depends on MAC80211 && USB
>> + depends on LEDS_CLASS
>
> With 'depends on', this item will disappear if LEDS_CLASS isn't selected.
> Would it use 'select' instead?
In general, 'select' is for hidden symbols, not user visible ones.
The main problem is mixing 'select' and 'depends on', as this
leads to circular dependencies. With LEDS_CLASS there is unfortunately
already a mix of the two that can be hard to clean up, but
'depends on' is usually the safer bet to avoid causing more
problems.
For wireless drivers, you can also use MAC80211_LEDS to abstract
some of this, but that is probably a larger rework.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency
2023-02-17 9:59 [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency Arnd Bergmann
2023-02-17 11:50 ` Ping-Ke Shih
@ 2023-02-17 16:31 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2023-02-17 16:31 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jes Sorensen, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Ping-Ke Shih, Bitterblue Smith, Arnd Bergmann,
linux-wireless, netdev, linux-kernel
Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> rtl8xxxu now unconditionally uses LEDS_CLASS, so a Kconfig dependency
> is required to avoid link errors:
>
> aarch64-linux-ld: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.o: in function `rtl8xxxu_disconnect':
> rtl8xxxu_core.c:(.text+0x730): undefined reference to `led_classdev_unregister'
>
> ERROR: modpost: "led_classdev_unregister" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined!
> ERROR: modpost: "led_classdev_register_ext" [drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.ko] undefined!
>
> Fixes: 3be01622995b ("wifi: rtl8xxxu: Register the LED and make it blink")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied to wireless-next.git, thanks.
38ae31922969 wifi: rtl8xxxu: add LEDS_CLASS dependency
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230217095910.2480356-1-arnd@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-17 16:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 9:59 [PATCH] wifi: rtl8xxxu: add LEDS_CLASS dependency Arnd Bergmann
2023-02-17 11:50 ` Ping-Ke Shih
2023-02-17 12:17 ` Arnd Bergmann
2023-02-17 16:31 ` Kalle Valo
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).