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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4869921.GXAFRqVoOG@radijator>
Date: Mon, 12 Feb 2024 15:31:50 +0100
From: Duje Mihanović <duje.mihanovic@...le.hr>
To: Arnd Bergmann <arnd@...nel.org>,
 Daniel Thompson <daniel.thompson@...aro.org>
Cc: Lee Jones <lee@...nel.org>, Jingoo Han <jingoohan1@...il.com>,
 Helge Deller <deller@....de>, Linus Walleij <linus.walleij@...aro.org>,
 Arnd Bergmann <arnd@...db.de>, Flavio Suligoi <f.suligoi@...m.it>,
 Hans de Goede <hdegoede@...hat.com>, Jianhua Lu <lujianhua000@...il.com>,
 "Matthew Wilcox (Oracle)" <willy@...radead.org>,
 dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] backlight: ktd2801: fix LED dependency

On Monday, February 12, 2024 1:44:28 PM CET Daniel Thompson wrote:
> On Mon, Feb 12, 2024 at 12:18:12PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> > 
> > The new backlight driver unconditionally selects LEDS_EXPRESSWIRE, which
> > is in a different subsystem that may be disabled here:
> > 
> > WARNING: unmet direct dependencies detected for LEDS_EXPRESSWIRE
> > 
> >   Depends on [n]: NEW_LEDS [=n] && GPIOLIB [=y]
> >   Selected by [y]:
> >   - BACKLIGHT_KTD2801 [=y] && HAS_IOMEM [=y] && BACKLIGHT_CLASS_DEVICE 
[=y]
> > 
> > Change the select to depends, to ensure the indirect dependency is
> > met as well even when LED support is disabled.
> > 
> > Fixes: 66c76c1cd984 ("backlight: Add Kinetic KTD2801 backlight support")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > ---
> > 
> >  drivers/video/backlight/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/video/backlight/Kconfig
> > b/drivers/video/backlight/Kconfig index 230bca07b09d..f83f9ef037fc 100644
> > --- a/drivers/video/backlight/Kconfig
> > +++ b/drivers/video/backlight/Kconfig
> > @@ -185,7 +185,7 @@ config BACKLIGHT_KTD253
> > 
> >  config BACKLIGHT_KTD2801
> >  
> >  	tristate "Backlight Driver for Kinetic KTD2801"
> > 
> > -	select LEDS_EXPRESSWIRE
> > +	depends on LEDS_EXPRESSWIRE
> 
> As far as I can tell this resolves the warning by making it impossible
> to enable BACKLIGHT_KTD2801 unless a largely unrelated driver
> (LEDS_KTD2692) is also enabled!
> 
> A better way to resolve this problem might be to eliminate the NEW_LEDS
> dependency entirely:

I believe this would be the best thing to do here. Making LEDS_EXPRESSWIRE 
user selectable doesn't make much sense to me as the library is rather low-
level (a quick grep turns up BTREE as an example of something similar) and IMO 
the GPIOLIB dependency should be handled by LEDS_EXPRESSWIRE as it's the one 
actually using the GPIO interface (except maybe for KTD2692 as it has some 
extra GPIOs not present in the other one and thus handles them itself).

Regards,
-- 
Duje




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ