netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: realtek: add LEDS_CLASS dependency
@ 2024-05-28 12:03 Arnd Bergmann
  2024-05-28 12:17 ` Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2024-05-28 12:03 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller
  Cc: Arnd Bergmann, Linus Walleij, Alvin Šipraga, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Luiz Angelo Daros de Luca, netdev,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

This driver fails to link when LED support is disabled:

ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!

Add a dependency that prevents this configuration.

Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/dsa/realtek/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/realtek/Kconfig b/drivers/net/dsa/realtek/Kconfig
index 6989972eebc3..6c90a83c71da 100644
--- a/drivers/net/dsa/realtek/Kconfig
+++ b/drivers/net/dsa/realtek/Kconfig
@@ -39,6 +39,7 @@ config NET_DSA_REALTEK_RTL8365MB
 config NET_DSA_REALTEK_RTL8366RB
 	tristate "Realtek RTL8366RB switch driver"
 	depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO
+	depends on LEDS_CLASS
 	select NET_DSA_TAG_RTL4_A
 	help
 	  Select to enable support for Realtek RTL8366RB.
-- 
2.39.2


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

* Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency
  2024-05-28 12:03 [PATCH] net: dsa: realtek: add LEDS_CLASS dependency Arnd Bergmann
@ 2024-05-28 12:17 ` Linus Walleij
  2024-06-08 16:03   ` Luiz Angelo Daros de Luca
  2024-06-11 22:13 ` Linus Walleij
  2024-09-02  8:04 ` Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2024-05-28 12:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Arnd Bergmann, Alvin Šipraga, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Luiz Angelo Daros de Luca, netdev, linux-kernel

On Tue, May 28, 2024 at 2:04 PM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> This driver fails to link when LED support is disabled:
>
> ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
>
> Add a dependency that prevents this configuration.
>
> Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

The QCA driver in drivers/net/dsa/qca/* instead makes the feature
optional on LED class, so it is in a separate file with stubs if the
LED class is not selected.

Luiz do you wanna try this or should I make a patch like that?

Yours,
Linus Walleij

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

* Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency
  2024-05-28 12:17 ` Linus Walleij
@ 2024-06-08 16:03   ` Luiz Angelo Daros de Luca
  0 siblings, 0 replies; 6+ messages in thread
From: Luiz Angelo Daros de Luca @ 2024-06-08 16:03 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Arnd Bergmann, Alvin Šipraga, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

> On Tue, May 28, 2024 at 2:04 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > This driver fails to link when LED support is disabled:
> >
> > ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> > ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> >
> > Add a dependency that prevents this configuration.
> >
> > Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> The QCA driver in drivers/net/dsa/qca/* instead makes the feature
> optional on LED class, so it is in a separate file with stubs if the
> LED class is not selected.

That would be great.

> Luiz do you wanna try this or should I make a patch like that?

You can do it. I'm a bit away from programming these days. Thanks.

> Yours,
> Linus Walleij

Regards,

Luiz

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

* Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency
  2024-05-28 12:03 [PATCH] net: dsa: realtek: add LEDS_CLASS dependency Arnd Bergmann
  2024-05-28 12:17 ` Linus Walleij
@ 2024-06-11 22:13 ` Linus Walleij
  2024-06-12  0:03   ` Luiz Angelo Daros de Luca
  2024-09-02  8:04 ` Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2024-06-11 22:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Arnd Bergmann, Alvin Šipraga, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Luiz Angelo Daros de Luca, netdev, linux-kernel

On Tue, May 28, 2024 at 2:04 PM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> This driver fails to link when LED support is disabled:
>
> ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
>
> Add a dependency that prevents this configuration.
>
> Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

I tried to create a separate .c file for the leds and stubbed functions
for the LED stuff, but it ended up having to create a set of headers
just to share things between the different parts of the drivers and
it was so messy that it's not worth it.

Yours,
Linus Walleij

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

* Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency
  2024-06-11 22:13 ` Linus Walleij
@ 2024-06-12  0:03   ` Luiz Angelo Daros de Luca
  0 siblings, 0 replies; 6+ messages in thread
From: Luiz Angelo Daros de Luca @ 2024-06-12  0:03 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Arnd Bergmann, Alvin Šipraga, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

> On Tue, May 28, 2024 at 2:04 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > This driver fails to link when LED support is disabled:
> >
> > ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> > ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> >
> > Add a dependency that prevents this configuration.

Thank you, Arnd.

> >
> > Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> I tried to create a separate .c file for the leds and stubbed functions
> for the LED stuff, but it ended up having to create a set of headers
> just to share things between the different parts of the drivers and
> it was so messy that it's not worth it.

Thanks, Linus. I'll give it a try next month. For now, the fixed
dependency is not a big deal as this switch was designed for small
routers, which normally have LEDs.

>
> Yours,
> Linus Walleij

Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>

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

* Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency
  2024-05-28 12:03 [PATCH] net: dsa: realtek: add LEDS_CLASS dependency Arnd Bergmann
  2024-05-28 12:17 ` Linus Walleij
  2024-06-11 22:13 ` Linus Walleij
@ 2024-09-02  8:04 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2024-09-02  8:04 UTC (permalink / raw)
  To: Arnd Bergmann, netdev, Jakub Kicinski, David S. Miller
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, Arnd Bergmann,
	Alvin Šipraga, Eric Dumazet, Paolo Abeni,
	Luiz Angelo Daros de Luca, linux-kernel

Hi David/Jakub,

On Tue, May 28, 2024 at 2:04 PM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> This driver fails to link when LED support is disabled:
>
> ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
>
> Add a dependency that prevents this configuration.
>
> Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Can you please apply this patch, the buildbots keep complaining about this,
and we agreed (I think) to take this dependency approach for now.

Yours,
Linus Walleij

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

end of thread, other threads:[~2024-09-02  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 12:03 [PATCH] net: dsa: realtek: add LEDS_CLASS dependency Arnd Bergmann
2024-05-28 12:17 ` Linus Walleij
2024-06-08 16:03   ` Luiz Angelo Daros de Luca
2024-06-11 22:13 ` Linus Walleij
2024-06-12  0:03   ` Luiz Angelo Daros de Luca
2024-09-02  8:04 ` Linus Walleij

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).