[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95e8cc82-2e7e-bca9-16ab-3148c3183f32@intel.com>
Date: Fri, 23 Feb 2024 15:15:59 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: Arnd Bergmann <arnd@...nel.org>, Jesse Brandeburg
<jesse.brandeburg@...el.com>
CC: Arnd Bergmann <arnd@...db.de>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
Abeni" <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] igc: fix LEDS_CLASS dependency
On 2/22/2024 2:02 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> When IGC is built-in but LEDS_CLASS is a loadable module, there is
> a link failure:
>
> x86_64-linux-ld: drivers/net/ethernet/intel/igc/igc_leds.o: in function `igc_led_setup':
> igc_leds.c:(.text+0x75c): undefined reference to `devm_led_classdev_register_ext'
>
> Add another dependency that prevents this combination.
>
> Fixes: ea578703b03d ("igc: Add support for LEDs on i225/i226")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/net/ethernet/intel/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
> index af7fa6856707..6e7901e12699 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -372,6 +372,7 @@ config IGC
> config IGC_LEDS
> def_bool LEDS_TRIGGER_NETDEV
> depends on IGC && LEDS_CLASS
> + depends on LEDS_CLASS=y || IGC=m
I don't know kbuild that well, but would this cover LEDS_CLASS=n with IGC=m?
There are Similar checks in the file [1][2] that would transpose to
depends on IGC && LEDS_CLASS && !(IGC=y && LEDS_CLASS=m)
which should cover that and keep the checks in the file consistent. IMO
a little more readable as well.
Thanks,
Tony
[1]
https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/intel/Kconfig#L109
[2]
https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/intel/Kconfig#L161
> help
> Optional support for controlling the NIC LED's with the netdev
> LED trigger.
Powered by blists - more mailing lists