linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-doc-tw-discuss@lists.sourceforge.net,
	linux-m68k@lists.linux-m68k.org, linux-sh@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Jonathan Corbet <corbet@lwn.net>, Alex Shi <alexs@kernel.org>,
	Yanteng Si <siyanteng@loongson.cn>, Hu Haowen <src.res@email.cn>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>, Greg Ungerer <gerg@linux-m68k.org>
Subject: Re: [PATCH v1 1/1] gpio: Remove unused and obsoleted irq_to_gpio()
Date: Thu, 12 Jan 2023 16:14:39 +0100	[thread overview]
Message-ID: <CAMuHMdXSc-H5TKBGisthv3DH3sZmF3fV_15FuMEt=typwTWUtA@mail.gmail.com> (raw)
In-Reply-To: <20230112133942.58471-1-andriy.shevchenko@linux.intel.com>

CC greg

On Thu, Jan 12, 2023 at 2:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> irq_to_gpio() is legacy and unused API, remove it for good.
>
> This leaves gpio_to_irq() as it's used yet in many places.
> Nevertheless, removal of its counterpart is a good signal
> to whoever even trying to consider using them that do not.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  Documentation/driver-api/gpio/legacy.rst             |  8 --------
>  .../translations/zh_CN/driver-api/gpio/legacy.rst    |  7 -------
>  Documentation/translations/zh_TW/gpio.txt            |  7 -------
>  arch/m68k/include/asm/gpio.h                         |  7 -------
>  arch/sh/include/asm/gpio.h                           |  5 -----
>  include/linux/gpio.h                                 | 12 ------------
>  6 files changed, 46 deletions(-)

[...]

> --- a/arch/m68k/include/asm/gpio.h
> +++ b/arch/m68k/include/asm/gpio.h
> @@ -66,13 +66,6 @@ static inline int gpio_to_irq(unsigned gpio)
>                 return __gpio_to_irq(gpio);
>  }
>
> -static inline int irq_to_gpio(unsigned irq)
> -{
> -       return (irq >= MCFGPIO_IRQ_VECBASE &&
> -               irq < (MCFGPIO_IRQ_VECBASE + MCFGPIO_IRQ_MAX)) ?
> -               irq - MCFGPIO_IRQ_VECBASE : -ENXIO;
> -}
> -
>  static inline int gpio_cansleep(unsigned gpio)
>  {
>         return gpio < MCFGPIO_PIN_MAX ? 0 : __gpio_cansleep(gpio);

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2023-01-12 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 13:39 [PATCH v1 1/1] gpio: Remove unused and obsoleted irq_to_gpio() Andy Shevchenko
2023-01-12 15:14 ` Geert Uytterhoeven [this message]
2023-01-16 13:15   ` Greg Ungerer
2023-01-13 15:51 ` Bartosz Golaszewski
2023-01-16 14:29 ` 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='CAMuHMdXSc-H5TKBGisthv3DH3sZmF3fV_15FuMEt=typwTWUtA@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=alexs@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=corbet@lwn.net \
    --cc=dalias@libc.org \
    --cc=gerg@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc-tw-discuss@lists.sourceforge.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=siyanteng@loongson.cn \
    --cc=src.res@email.cn \
    --cc=ysato@users.sourceforge.jp \
    /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).