Re: [PATCH 4.19 21/57] gpio: Fix build error of function redefinition
From: Pavel Machek
Date: Mon Sep 09 2019 - 08:23:16 EST
On Sun 2019-09-08 13:41:45, Greg Kroah-Hartman wrote:
> [ Upstream commit 68e03b85474a51ec1921b4d13204782594ef7223 ]
>
> when do randbuilding, I got this error:
>
> In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
> ./include/linux/gpio/driver.h:576:1: error: redefinition of gpiochip_add_pin_range
> gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
> ./include/linux/gpio.h:245:1: note: previous definition of gpiochip_add_pin_range was here
> gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
> ^~~~~~~~~~~~~~~~~~~~~~
>
I'm pretty sure this will cause problems.
driver.h versions return zero and are conditional on !CONFIG_PINCTRL.
gpio.h versions did return error and did warn... and are conditional
on !CONFIG_GPIOLIB.
So this introduces error in !CONFIG_PINCTRL && !CONFIG_GPIOLIB case.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature