* [PATCH] gpio: drop broken to_gpio_irq_chip() helper
@ 2018-11-12 14:10 Johan Hovold
2018-11-12 15:48 ` Bartosz Golaszewski
2018-11-16 21:47 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2018-11-12 14:10 UTC (permalink / raw)
To: Linus Walleij
Cc: Bartosz Golaszewski, linux-gpio, linux-kernel, Johan Hovold,
Thierry Reding, Grygorii Strashko
Drop the broken to_gpio_irq_chip() container_of() helper, which would
break the build for anyone who tries to use it.
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@nvidia.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Johan Hovold <johan@kernel.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: drop broken to_gpio_irq_chip() helper
2018-11-12 14:10 [PATCH] gpio: drop broken to_gpio_irq_chip() helper Johan Hovold
@ 2018-11-12 15:48 ` Bartosz Golaszewski
2018-11-16 21:47 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2018-11-12 15:48 UTC (permalink / raw)
To: johan; +Cc: Linus Walleij, linux-gpio, LKML, treding, Grygorii Strashko
pon., 12 lis 2018 o 15:11 Johan Hovold <johan@kernel.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@nvidia.com>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Johan Hovold <johan@kernel.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@baylibre.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: drop broken to_gpio_irq_chip() helper
2018-11-12 14:10 [PATCH] gpio: drop broken to_gpio_irq_chip() helper Johan Hovold
2018-11-12 15:48 ` Bartosz Golaszewski
@ 2018-11-16 21:47 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-11-16 21:47 UTC (permalink / raw)
To: Johan Hovold
Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, linux-kernel,
Thierry Reding, Grygorii Strashko
On Mon, Nov 12, 2018 at 3:11 PM Johan Hovold <johan@kernel.org> wrote:
> Drop the broken to_gpio_irq_chip() container_of() helper, which would
> break the build for anyone who tries to use it.
>
> 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@nvidia.com>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Patch applied, thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-16 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 14:10 [PATCH] gpio: drop broken to_gpio_irq_chip() helper Johan Hovold
2018-11-12 15:48 ` Bartosz Golaszewski
2018-11-16 21:47 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).