* [PATCH][next] hwmon: pmbus: ucd9000: remove unneeded include
@ 2019-08-08 8:01 Bartosz Golaszewski
2019-08-08 13:29 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2019-08-08 8:01 UTC (permalink / raw)
To: Guenter Roeck, Jean Delvare
Cc: linux-hwmon, linux-kernel, Bartosz Golaszewski,
kbuild test robot, Linus Walleij
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Build bot reports the following build issue after commit 9091373ab7ea
("gpio: remove less important #ifdef around declarations):
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,
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
>> include/linux/gpio/driver.h:583:1: error: redefinition of 'gpiochip_add_pingroup_range'
gpiochip_add_pingroup_range(struct gpio_chip *chip,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
include/linux/gpio.h:254:1: note: previous definition of 'gpiochip_add_pingroup_range' was here
gpiochip_add_pingroup_range(struct gpio_chip *chip,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
>> include/linux/gpio/driver.h:591:1: error: redefinition of 'gpiochip_remove_pin_ranges'
gpiochip_remove_pin_ranges(struct gpio_chip *chip)
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
include/linux/gpio.h:263:1: note: previous definition of 'gpiochip_remove_pin_ranges' was here
gpiochip_remove_pin_ranges(struct gpio_chip *chip)
This is caused by conflicting defines from linux/gpio.h and
linux/gpio/driver.h. Drivers should not include both the legacy and
the new API headers. This driver doesn't even use linux/gpio.h so
remove it.
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
drivers/hwmon/pmbus/ucd9000.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c
index c846759bc1c0..a9229c6b0e84 100644
--- a/drivers/hwmon/pmbus/ucd9000.c
+++ b/drivers/hwmon/pmbus/ucd9000.c
@@ -15,7 +15,6 @@
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/pmbus.h>
-#include <linux/gpio.h>
#include <linux/gpio/driver.h>
#include "pmbus.h"
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] hwmon: pmbus: ucd9000: remove unneeded include
2019-08-08 8:01 [PATCH][next] hwmon: pmbus: ucd9000: remove unneeded include Bartosz Golaszewski
@ 2019-08-08 13:29 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2019-08-08 13:29 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Jean Delvare, linux-hwmon, linux-kernel, Bartosz Golaszewski,
kbuild test robot, Linus Walleij
On Thu, Aug 08, 2019 at 10:01:44AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> Build bot reports the following build issue after commit 9091373ab7ea
> ("gpio: remove less important #ifdef around declarations):
>
> 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,
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
> >> include/linux/gpio/driver.h:583:1: error: redefinition of 'gpiochip_add_pingroup_range'
> gpiochip_add_pingroup_range(struct gpio_chip *chip,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
> include/linux/gpio.h:254:1: note: previous definition of 'gpiochip_add_pingroup_range' was here
> gpiochip_add_pingroup_range(struct gpio_chip *chip,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
> >> include/linux/gpio/driver.h:591:1: error: redefinition of 'gpiochip_remove_pin_ranges'
> gpiochip_remove_pin_ranges(struct gpio_chip *chip)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
> include/linux/gpio.h:263:1: note: previous definition of 'gpiochip_remove_pin_ranges' was here
> gpiochip_remove_pin_ranges(struct gpio_chip *chip)
>
> This is caused by conflicting defines from linux/gpio.h and
> linux/gpio/driver.h. Drivers should not include both the legacy and
> the new API headers. This driver doesn't even use linux/gpio.h so
> remove it.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/pmbus/ucd9000.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c
> index c846759bc1c0..a9229c6b0e84 100644
> --- a/drivers/hwmon/pmbus/ucd9000.c
> +++ b/drivers/hwmon/pmbus/ucd9000.c
> @@ -15,7 +15,6 @@
> #include <linux/slab.h>
> #include <linux/i2c.h>
> #include <linux/pmbus.h>
> -#include <linux/gpio.h>
> #include <linux/gpio/driver.h>
> #include "pmbus.h"
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-08 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 8:01 [PATCH][next] hwmon: pmbus: ucd9000: remove unneeded include Bartosz Golaszewski
2019-08-08 13:29 ` Guenter Roeck
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).