lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYWXyw6qZBmkf_uN0WcXL3v2iRWbsHjqvmkZ1bWC8Bbmw@mail.gmail.com>
Date: Sat, 15 Feb 2025 01:07:32 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Alvin Šipraga <alsi@...g-olufsen.dk>, 
	Vladimir Oltean <olteanv@...il.com>, "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Luiz Angelo Daros de Luca <luizluca@...il.com>, netdev@...r.kernel.org, 
	kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] net: dsa: rtl8366rb: Fix compilation problem

On Fri, Feb 14, 2025 at 3:06 PM Andrew Lunn <andrew@...n.ch> wrote:
> On Fri, Feb 14, 2025 at 09:59:57AM +0100, Linus Walleij wrote:
> > When the kernel is compiled without LED framework support the
> > rtl8366rb fails to build like this:
> >
> > rtl8366rb.o: in function `rtl8366rb_setup_led':
> > rtl8366rb.c:953:(.text.unlikely.rtl8366rb_setup_led+0xe8):
> >   undefined reference to `led_init_default_state_get'
> > rtl8366rb.c:980:(.text.unlikely.rtl8366rb_setup_led+0x240):
> >   undefined reference to `devm_led_classdev_register_ext'
> >
> > As this is constantly coming up in different randconfig builds,
> > bite the bullet and add some nasty ifdefs to rid this issue.
>
> At least for DSA drivers, it is more normal to put the LED code into a
> separate compilation unit and provide stubs for when it is not
> used. That avoids a lot of nasty #ifdefs. Could you do the same here?

I can pull out *some* code to a separate file like that, but
some LED-related registers are also accessed when the LED
framework is disabled, so it would lead to a bit of unnatural
split between the two files with some always-available
LED code staying in the main file.

But if that's cool, I can do it.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ