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: <CAMpxmJVzbQ850uMkwG+e5Gg_GgfLS_wxXOoY+xEXfjqfFyt75A@mail.gmail.com>
Date:   Mon, 12 Nov 2018 16:48:51 +0100
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     johan@...nel.org
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, treding@...dia.com,
        Grygorii Strashko <grygorii.strashko@...com>
Subject: Re: [PATCH] gpio: drop broken to_gpio_irq_chip() helper

pon., 12 lis 2018 o 15:11 Johan Hovold <johan@...nel.org> napisaƂ(a):
>
> Drop the broken to_gpio_irq_chip() container_of() helper, which would
> break the build for anyone who tries to use it.
>

Which is the usual problem with APIs nobody uses...

> Specifically, struct gpio_irq_chip only holds a pointer to a struct
> irq_chip so using container_of() on an irq-chip pointer makes no sense.
>
> Fixes: da80ff81a8f5 ("gpio: Move irqchip into struct gpio_irq_chip")
> Cc: Thierry Reding <treding@...dia.com>
> Cc: Grygorii Strashko <grygorii.strashko@...com>
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>  include/linux/gpio/driver.h | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index 2db62b550b95..21bff1f14fde 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -166,11 +166,6 @@ struct gpio_irq_chip {
>          */
>         void            (*irq_disable)(struct irq_data *data);
>  };
> -
> -static inline struct gpio_irq_chip *to_gpio_irq_chip(struct irq_chip *chip)
> -{
> -       return container_of(chip, struct gpio_irq_chip, chip);
> -}
>  #endif
>
>  /**
> --
> 2.19.1
>

Reviewed-by: Bartosz Golaszewski <bgolaszewski@...libre.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ