All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Alexandre Courbot <acourbot@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h
Date: Fri, 23 Aug 2019 12:00:26 +0200	[thread overview]
Message-ID: <CACRpkdapgDbkm3JjywtPv=5gYKQCCXzdabDumVukFv5Dn5pomA@mail.gmail.com> (raw)
In-Reply-To: <20190822031817.32888-1-yuehaibing@huawei.com>

On Thu, Aug 22, 2019 at 5:19 AM YueHaibing <yuehaibing@huawei.com> wrote:

> If CONFIG_GPIOLIB is not, gpiochip_lock/unlock_as_irq will
> conflict as this:
>
> In file included from sound/soc/codecs/wm5100.c:18:0:
> ./include/linux/gpio.h:224:19: error: static declaration of gpiochip_lock_as_irq follows non-static declaration
>  static inline int gpiochip_lock_as_irq(struct gpio_chip *chip,
>                    ^~~~~~~~~~~~~~~~~~~~
> In file included from sound/soc/codecs/wm5100.c:17:0:
> ./include/linux/gpio/driver.h:494:5: note: previous declaration of gpiochip_lock_as_irq was here
>  int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
>      ^~~~~~~~~~~~~~~~~~~~
> In file included from sound/soc/codecs/wm5100.c:18:0:
> ./include/linux/gpio.h:231:20: error: static declaration of gpiochip_unlock_as_irq follows non-static declaration
>  static inline void gpiochip_unlock_as_irq(struct gpio_chip *chip,
>                     ^~~~~~~~~~~~~~~~~~~~~~
> In file included from sound/soc/codecs/wm5100.c:17:0:
> ./include/linux/gpio/driver.h:495:6: note: previous declaration of gpiochip_unlock_as_irq was here
>  void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);
>      ^~~~~~~~~~~~~~~~~~~~~~
>
> Move them to gpio/driver.h and use CONFIG_GPIOLIB guard this.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: d74be6dfea1b ("gpio: remove gpiod_lock/unlock_as_irq()")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Patch applied with some fuzzing.

Yours,
Linus Walleij

  reply	other threads:[~2019-08-23 10:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  3:18 [PATCH] gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h YueHaibing
2019-08-23 10:00 ` Linus Walleij [this message]
2019-09-04 15:46   ` [PATCH] gpio: Move gpiochip_.*lock_as_irq() to the proper ifdef Sebastian Andrzej Siewior
2019-09-05  2:04     ` Yuehaibing
2019-09-05  9:36       ` 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='CACRpkdapgDbkm3JjywtPv=5gYKQCCXzdabDumVukFv5Dn5pomA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=acourbot@nvidia.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuehaibing@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.