linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: johan@kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	treding@nvidia.com, Grygorii Strashko <grygorii.strashko@ti.com>
Subject: Re: [PATCH] gpio: drop broken to_gpio_irq_chip() helper
Date: Mon, 12 Nov 2018 16:48:51 +0100	[thread overview]
Message-ID: <CAMpxmJVzbQ850uMkwG+e5Gg_GgfLS_wxXOoY+xEXfjqfFyt75A@mail.gmail.com> (raw)
In-Reply-To: <20181112141028.10213-1-johan@kernel.org>

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>

  reply	other threads:[~2018-11-12 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 14:10 [PATCH] gpio: drop broken to_gpio_irq_chip() helper Johan Hovold
2018-11-12 15:48 ` Bartosz Golaszewski [this message]
2018-11-16 21:47 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMpxmJVzbQ850uMkwG+e5Gg_GgfLS_wxXOoY+xEXfjqfFyt75A@mail.gmail.com \
    --to=bgolaszewski@baylibre.com \
    --cc=grygorii.strashko@ti.com \
    --cc=johan@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).