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: <CAK8P3a0J1f9+o6Uqdn4QeQ=30oW6p+fOaFU7-5L0cW-zihfNxg@mail.gmail.com>
Date:   Tue, 9 Nov 2021 23:46:53 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 6/8] gpiolib: remove legacy gpio_export

On Tue, Nov 9, 2021 at 9:42 PM Linus Walleij <linus.walleij@...aro.org> wrote:
> On Tue, Nov 9, 2021 at 11:50 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> > I think the TODO list is in Linus' head,
>
> Oh no, drivers/gpio/TODO
>
> > but it would include all the files
> > that use one of the interfaces in linux/gpio.h. I found about 350 of them,
> > so there is little point in listing them one at a time. IIRC Linus is going
> > through those one subsystem at a time.
>
> Yeah but if it's just me I doubt that I will manage to do it by the
> time I retire in 2037 or so... So the TODO is there to inspire others
> to step in and help out.

I think at the current rate, it should only take about another ten years: ;-)

$ for i in v3.18 v4.1 v4.4 v4.9 v4.14 v4.19 v5.4 v5.10 v5.15 ; do echo
-n $i\  ;  git grep -wl
'\<\(gpio_direction_input\|gpio_direction_output\|gpio_get_value_cansleep\|gpio_set_value_cansleep\|gpio_get_value\|gpio_set_value\|gpio_to_irq\|gpio_request\|gpio_request_one\|gpio_request_array\)\>\|\<\(ARCH_NR_GPIOS\|GPIOF_DIR_\|GPIOF_INIT\|GPIOF_EXPORT\|GPIOF_OPEN\|GPIOF_IN\|GPIOF_OUT\|gpio_is_valid\\|gpio_free\|devm_gpio_\)'
$i | wc -l ; done
v3.18 676
v4.1 669
v4.4 646
v4.9 639
v4.14 614
v4.19 553
v5.4 465
v5.10 381
v5.15 354

I'm a fan of deconstruction interfaces one function call at a time, which
is different from your one-subsystem at a time approach, but these can
obviously be done at the same time. This 8-patch series is hopefully a good
step in that direction, removing some of the more obscure interfaces
and making the rest a little more obvious.

I've also started a patch series to remove some of the less common
of_gpio portions, which gets rid of of_get_gpio(), of_get_gpio_flags()
and of_get_named_gpio_flags() but leaves of_get_named_gpio() in
place for now. I'm much less confident about that work though, so I
haven't posted that. I think killing off the of_gpio consumer-side
interfaces entirely would likely make the biggest impact, as those
appear to still be used a lot in relatively modern drivers, while the
traditional gpio_request() interfaces are mainly used in drivers for
legacy boards that don't have a long future ahead of them unless
they get converted to DT.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ