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: <20250820071656.GJ7508@google.com>
Date: Wed, 20 Aug 2025 08:16:56 +0100
From: Lee Jones <lee@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Arnd Bergmann <arnd@...nel.org>, Bartosz Golaszewski <brgl@...ev.pl>,
	Linus Walleij <linus.walleij@...aro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
	Pavel Machek <pavel@...nel.org>,
	Javier Carrasco <javier.carrasco.cruz@...il.com>,
	"Gustavo A. R. Silva" <gustavoars@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Kees Cook <kees@...nel.org>, Anish Kumar <yesanishhere@...il.com>,
	Mukesh Ojha <quic_mojha@...cinc.com>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	Dmitry Rokosov <ddrokosov@...utedevices.com>,
	linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/21] leds: gpio: make legacy gpiolib interface optional

On Tue, 19 Aug 2025, Arnd Bergmann wrote:

> On Tue, Aug 19, 2025, at 14:19, Lee Jones wrote:
> > On Fri, 08 Aug 2025, Arnd Bergmann wrote:
> >>  {
> >>  	struct gpio_desc *gpiod;
> >> +#ifdef CONFIG_GPIOLIB_LEGACY
> >>  	int ret;
> >> +#endif
> >
> > Isn't there another way to do his that doesn't entail sprinkling #ifery
> > around C-files?
> >
> 
> An alternativew would be to duplicate the driver and have
> one modern variant and an additional legacy variant that
> is only used on the few remaining platforms that select CONFIG_GPIOLIB_LEGACY and define platform data. See below
> for the list of files that reference struct gpio_led.
> 
> There are already patches to convert some of those to
> software nodes, and a lot of the others can probably be
> removed, in particular the orion5x ones.
> 
> The leds-gpio driver with just the legacy interfaces left
> would be a really small driver, and removing those bits from
> the normal one would make that a bit simpler as well, but
> there would be some amount of duplication.

Sounds like we're between a rock and a hard place with this.

Will the legacy parts be removed at some point or do you foresee us
supporting this forever?

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ