On Thu, Aug 22, 2019 at 5:19 AM YueHaibing <yuehaibing@xxxxxxxxxx> 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@xxxxxxxxxx> > Fixes: d74be6dfea1b ("gpio: remove gpiod_lock/unlock_as_irq()") > Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> Patch applied with some fuzzing. Yours, Linus Walleij