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] [day] [month] [year] [list]
Message-ID: <CAMRc=Mf2me=Jv=kM6nkNwPVjYzKg-xWxXtiRRju12OM1nSqpfw@mail.gmail.com>
Date:   Fri, 3 Dec 2021 15:51:38 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Geert Uytterhoeven <geert+renesas@...der.be>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH resend] gpiolib: Let gpiod_add_lookup_table() call gpiod_add_lookup_tables()

On Fri, Dec 3, 2021 at 2:48 PM Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
>
> This saves 20 bytes on arm32, and 44 bytes on arm64.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> Interestingly, making gpiod_add_lookup_table() a static inline function
> in <linux/gpio/machine.h> instead would increase the caller's code size
> by 68 bytes on arm32...
> ---
>  drivers/gpio/gpiolib.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index abfbf546d1599ebc..85168f88a7fec774 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -3487,11 +3487,7 @@ EXPORT_SYMBOL_GPL(gpiod_set_array_value_cansleep);
>   */
>  void gpiod_add_lookup_table(struct gpiod_lookup_table *table)
>  {
> -       mutex_lock(&gpio_lookup_lock);
> -
> -       list_add_tail(&table->list, &gpio_lookup_list);
> -
> -       mutex_unlock(&gpio_lookup_lock);
> +       gpiod_add_lookup_tables(&table, 1);
>  }
>  EXPORT_SYMBOL_GPL(gpiod_add_lookup_table);
>
> --
> 2.25.1
>

Applied, thanks!

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ