Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
Hi. 2017-08-01 20:04 GMT+09:00 Andy Shevchenko : > On Tue, Aug 1, 2017 at 10:53 AM, Linus Walleij > wrote: >> On Mon, Jul 31, 2017 at 4:04 PM, Andy Shevchenko >> wrote: >>> On Mon, 2017-07-31 at 15:48 +0200, Linus Walleij wrote: On Tue, Jul 4, 2017 at 12:06 PM, Andy Shevchenko wrote: > > If Linus is okay with the following proposal I would rather go with > it, > i.e. logical split the series to > > 1. Fix IRQ related headers inclusion > 2. Fix pinconf-generic.h inclusion > 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) That works fine with me, but also one big patch actually, I do not want to make it too much work to refactor obviously incorrect things. As soon as we have rough consensus on this and the build robot are happy I will apply it to GPIO and also pull it into the pinctrl subsystem. >>> >>> For me priorities like this: >>> 1) it works after the patch being applied (no regressions); >>> 2) it makes code cleaner at the end; >>> 3) it is presented in logically split parts. >>> >>> So, as long as 1) and 2) are satisfied I can neglect on 3). >> >> We are in violent agreement :D > > What I would like to say is that is up to you after all :-) > For me looks better to split. I will split this into sensible chunks. As I mentioned before, linux/gpio/driver.h is included from several sub-systems, so I need at least two development cycles to finish this task. Maybe, [1] Send patches to subsystems (gpio, pinctrl, etc.) for v4.14 (splitting into sensible chunks, like per-driver) [2] Drop unneeded includes from linux/gpio/driver.h for v4.15 -- Best Regards Masahiro Yamada
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On 07/03/2017 10:53 PM, Masahiro Yamada wrote: Some of include directives in include/linux/gpio/driver.h are unneeded because the header does not need to know the content of struct device, irq_chip, etc. Just declare they are structures. On the other hand, and turned out to be necessary for irq_flow_handler_t and spinlock_t, respectively. Each driver should include what it needs without relying on what is implicitly included from . This will cut down unnecessary header parsing. Signed-off-by: Masahiro Yamada --- drivers/gpio/gpio-altera-a10sr.c | 2 ++ drivers/gpio/gpio-altera.c | 3 +++ For the Altera GPIO files: Acked-by: Thor Thayer
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Tue, Aug 1, 2017 at 10:53 AM, Linus Walleij wrote: > On Mon, Jul 31, 2017 at 4:04 PM, Andy Shevchenko > wrote: >> On Mon, 2017-07-31 at 15:48 +0200, Linus Walleij wrote: >>> On Tue, Jul 4, 2017 at 12:06 PM, Andy Shevchenko >>> wrote: >>> > If Linus is okay with the following proposal I would rather go with >>> > it, >>> > i.e. logical split the series to >>> > >>> > 1. Fix IRQ related headers inclusion >>> > 2. Fix pinconf-generic.h inclusion >>> > 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) >>> >>> That works fine with me, but also one big patch actually, I do not >>> want to make it too much work to refactor obviously incorrect things. >>> >>> As soon as we have rough consensus on this and the build robot >>> are happy I will apply it to GPIO and also pull it into the pinctrl >>> subsystem. >> >> For me priorities like this: >> 1) it works after the patch being applied (no regressions); >> 2) it makes code cleaner at the end; >> 3) it is presented in logically split parts. >> >> So, as long as 1) and 2) are satisfied I can neglect on 3). > > We are in violent agreement :D What I would like to say is that is up to you after all :-) For me looks better to split. -- With Best Regards, Andy Shevchenko
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Mon, Jul 31, 2017 at 4:04 PM, Andy Shevchenko wrote: > On Mon, 2017-07-31 at 15:48 +0200, Linus Walleij wrote: >> On Tue, Jul 4, 2017 at 12:06 PM, Andy Shevchenko >> wrote: >> > On Tue, 2017-07-04 at 12:53 +0900, Masahiro Yamada wrote: >> > > Some of include directives in include/linux/gpio/driver.h are >> > > unneeded because the header does not need to know the content of >> > > struct device, irq_chip, etc. Just declare they are structures. >> > > >> > > On the other hand, and >> > > >> > > turned out to be necessary for irq_flow_handler_t and spinlock_t, >> > > respectively. >> > > >> > > Each driver should include what it needs without relying on what >> > > is >> > > implicitly included from . This will cut >> > > down >> > > unnecessary header parsing. >> > >> > If Linus is okay with the following proposal I would rather go with >> > it, >> > i.e. logical split the series to >> > >> > 1. Fix IRQ related headers inclusion >> > 2. Fix pinconf-generic.h inclusion >> > 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) >> >> That works fine with me, but also one big patch actually, I do not >> want to make it too much work to refactor obviously incorrect things. >> >> As soon as we have rough consensus on this and the build robot >> are happy I will apply it to GPIO and also pull it into the pinctrl >> subsystem. > > For me priorities like this: > 1) it works after the patch being applied (no regressions); > 2) it makes code cleaner at the end; > 3) it is presented in logically split parts. > > So, as long as 1) and 2) are satisfied I can neglect on 3). We are in violent agreement :D Yours, Linus Walleij
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Mon, 2017-07-31 at 15:48 +0200, Linus Walleij wrote: > On Tue, Jul 4, 2017 at 12:06 PM, Andy Shevchenko > wrote: > > On Tue, 2017-07-04 at 12:53 +0900, Masahiro Yamada wrote: > > > Some of include directives in include/linux/gpio/driver.h are > > > unneeded because the header does not need to know the content of > > > struct device, irq_chip, etc. Just declare they are structures. > > > > > > On the other hand, and > > > > > > turned out to be necessary for irq_flow_handler_t and spinlock_t, > > > respectively. > > > > > > Each driver should include what it needs without relying on what > > > is > > > implicitly included from . This will cut > > > down > > > unnecessary header parsing. > > > > If Linus is okay with the following proposal I would rather go with > > it, > > i.e. logical split the series to > > > > 1. Fix IRQ related headers inclusion > > 2. Fix pinconf-generic.h inclusion > > 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) > > That works fine with me, but also one big patch actually, I do not > want to make it too much work to refactor obviously incorrect things. > > As soon as we have rough consensus on this and the build robot > are happy I will apply it to GPIO and also pull it into the pinctrl > subsystem. For me priorities like this: 1) it works after the patch being applied (no regressions); 2) it makes code cleaner at the end; 3) it is presented in logically split parts. So, as long as 1) and 2) are satisfied I can neglect on 3). -- Andy Shevchenko Intel Finland Oy
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Tue, Jul 4, 2017 at 12:06 PM, Andy Shevchenko wrote: > On Tue, 2017-07-04 at 12:53 +0900, Masahiro Yamada wrote: >> Some of include directives in include/linux/gpio/driver.h are >> unneeded because the header does not need to know the content of >> struct device, irq_chip, etc. Just declare they are structures. >> >> On the other hand, and >> turned out to be necessary for irq_flow_handler_t and spinlock_t, >> respectively. >> >> Each driver should include what it needs without relying on what is >> implicitly included from . This will cut down >> unnecessary header parsing. > > If Linus is okay with the following proposal I would rather go with it, > i.e. logical split the series to > > 1. Fix IRQ related headers inclusion > 2. Fix pinconf-generic.h inclusion > 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) That works fine with me, but also one big patch actually, I do not want to make it too much work to refactor obviously incorrect things. As soon as we have rough consensus on this and the build robot are happy I will apply it to GPIO and also pull it into the pinctrl subsystem. Yours, Linus Walleij
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
Hi Masahiro, [auto build test ERROR on next-20170705] [cannot apply to gpio/for-next tegra/for-next xlnx/master v4.12 v4.12-rc7 v4.12-rc6 v4.12] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Masahiro-Yamada/gpio-drop-unnecessary-includes-from-include-linux-gpio-driver-h/20170706-123711 config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): drivers//gpio/gpio-exar.c: In function 'gpio_exar_probe': >> drivers//gpio/gpio-exar.c:135:2: error: implicit declaration of function >> 'device_property_read_u32' [-Werror=implicit-function-declaration] ret = device_property_read_u32(&pdev->dev, "linux,first-pin", ^ cc1: some warnings being treated as errors -- drivers//gpio/gpio-lp87565.c: In function 'lp87565_gpio_set_config': >> drivers//gpio/gpio-lp87565.c:116:2: error: implicit declaration of function >> 'pinconf_to_config_param' [-Werror=implicit-function-declaration] switch (pinconf_to_config_param(config)) { ^ >> drivers//gpio/gpio-lp87565.c:117:7: error: 'PIN_CONFIG_DRIVE_OPEN_DRAIN' >> undeclared (first use in this function) case PIN_CONFIG_DRIVE_OPEN_DRAIN: ^ drivers//gpio/gpio-lp87565.c:117:7: note: each undeclared identifier is reported only once for each function it appears in >> drivers//gpio/gpio-lp87565.c:124:7: error: 'PIN_CONFIG_DRIVE_PUSH_PULL' >> undeclared (first use in this function) case PIN_CONFIG_DRIVE_PUSH_PULL: ^ cc1: some warnings being treated as errors vim +/device_property_read_u32 +135 drivers//gpio/gpio-exar.c 6596e59e Sudip Mukherjee 2017-01-19 119 static int gpio_exar_probe(struct platform_device *pdev) 6596e59e Sudip Mukherjee 2017-01-19 120 { d3936d74 Jan Kiszka 2017-06-09 121struct pci_dev *pcidev = to_pci_dev(pdev->dev.parent); 6596e59e Sudip Mukherjee 2017-01-19 122struct exar_gpio_chip *exar_gpio; 380b1e2f Jan Kiszka 2017-05-22 123u32 first_pin, ngpios; 6596e59e Sudip Mukherjee 2017-01-19 124void __iomem *p; 6596e59e Sudip Mukherjee 2017-01-19 125int index, ret; 6596e59e Sudip Mukherjee 2017-01-19 126 6596e59e Sudip Mukherjee 2017-01-19 127/* 8847f5f9 Jan Kiszka 2017-05-02 128 * The UART driver must have mapped region 0 prior to registering this 8847f5f9 Jan Kiszka 2017-05-02 129 * device - use it. 6596e59e Sudip Mukherjee 2017-01-19 130 */ 8847f5f9 Jan Kiszka 2017-05-02 131p = pcim_iomap_table(pcidev)[0]; 6596e59e Sudip Mukherjee 2017-01-19 132if (!p) 6596e59e Sudip Mukherjee 2017-01-19 133return -ENOMEM; 6596e59e Sudip Mukherjee 2017-01-19 134 380b1e2f Jan Kiszka 2017-05-22 @135ret = device_property_read_u32(&pdev->dev, "linux,first-pin", 380b1e2f Jan Kiszka 2017-05-22 136 &first_pin); 380b1e2f Jan Kiszka 2017-05-22 137if (ret) 380b1e2f Jan Kiszka 2017-05-22 138return ret; 380b1e2f Jan Kiszka 2017-05-22 139 380b1e2f Jan Kiszka 2017-05-22 140ret = device_property_read_u32(&pdev->dev, "ngpios", &ngpios); 380b1e2f Jan Kiszka 2017-05-22 141if (ret) 380b1e2f Jan Kiszka 2017-05-22 142return ret; 380b1e2f Jan Kiszka 2017-05-22 143 :: The code at line 135 was first introduced by commit :: 380b1e2f3a2f32bfe9c0aa85a68629eb99b043c0 gpio-exar/8250-exar: Make set of exported GPIOs configurable :: TO: Jan Kiszka :: CC: Jan Kiszka --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
Hi Masahiro, [auto build test ERROR on next-20170705] [cannot apply to gpio/for-next tegra/for-next xlnx/master v4.12 v4.12-rc7 v4.12-rc6 v4.12] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Masahiro-Yamada/gpio-drop-unnecessary-includes-from-include-linux-gpio-driver-h/20170706-123711 config: blackfin-allyesconfig (attached as .config) compiler: bfin-uclinux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=blackfin All error/warnings (new ones prefixed by >>): drivers//i2c/muxes/i2c-mux-ltc4306.c: In function 'ltc4306_gpio_set_config': >> drivers//i2c/muxes/i2c-mux-ltc4306.c:138:10: error: implicit declaration of >> function 'pinconf_to_config_param' [-Werror=implicit-function-declaration] switch (pinconf_to_config_param(config)) { ^~~ >> drivers//i2c/muxes/i2c-mux-ltc4306.c:139:7: error: >> 'PIN_CONFIG_DRIVE_OPEN_DRAIN' undeclared (first use in this function) case PIN_CONFIG_DRIVE_OPEN_DRAIN: ^~~ drivers//i2c/muxes/i2c-mux-ltc4306.c:139:7: note: each undeclared identifier is reported only once for each function it appears in >> drivers//i2c/muxes/i2c-mux-ltc4306.c:142:7: error: >> 'PIN_CONFIG_DRIVE_PUSH_PULL' undeclared (first use in this function) case PIN_CONFIG_DRIVE_PUSH_PULL: ^~ cc1: some warnings being treated as errors -- drivers//staging/greybus/gpio.c: In function 'gb_gpio_set_config': >> drivers//staging/greybus/gpio.c:483:6: error: implicit declaration of >> function 'pinconf_to_config_param' [-Werror=implicit-function-declaration] if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE) ^~~ >> drivers//staging/greybus/gpio.c:483:41: error: 'PIN_CONFIG_INPUT_DEBOUNCE' >> undeclared (first use in this function) if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE) ^ drivers//staging/greybus/gpio.c:483:41: note: each undeclared identifier is reported only once for each function it appears in >> drivers//staging/greybus/gpio.c:486:13: error: implicit declaration of >> function 'pinconf_to_config_argument' [-Werror=implicit-function-declaration] debounce = pinconf_to_config_argument(config); ^~ cc1: some warnings being treated as errors -- drivers/usb/serial/cp210x.c: In function 'cp210x_gpio_set_config': >> drivers/usb/serial/cp210x.c:1340:7: error: variable 'param' has initializer >> but incomplete type enum pin_config_param param = pinconf_to_config_param(config); ^~~~ >> drivers/usb/serial/cp210x.c:1340:32: error: implicit declaration of function >> 'pinconf_to_config_param' [-Werror=implicit-function-declaration] enum pin_config_param param = pinconf_to_config_param(config); ^~~ >> drivers/usb/serial/cp210x.c:1340:24: error: storage size of 'param' isn't >> known enum pin_config_param param = pinconf_to_config_param(config); ^ >> drivers/usb/serial/cp210x.c:1343:16: error: 'PIN_CONFIG_DRIVE_PUSH_PULL' >> undeclared (first use in this function) if ((param == PIN_CONFIG_DRIVE_PUSH_PULL) && ^~ drivers/usb/serial/cp210x.c:1343:16: note: each undeclared identifier is reported only once for each function it appears in >> drivers/usb/serial/cp210x.c:1347:16: error: 'PIN_CONFIG_DRIVE_OPEN_DRAIN' >> undeclared (first use in this function) if ((param == PIN_CONFIG_DRIVE_OPEN_DRAIN) && ^~~ drivers/usb/serial/cp210x.c:1340:24: warning: unused variable 'param' [-Wunused-variable] enum pin_config_param param = pinconf_to_config_param(config); ^ cc1: some warnings being treated as errors -- drivers/hid/hid-cp2112.c: In function 'cp2112_gpio_irq_mask': >> drivers/hid/hid-cp2112.c:1065:25: error: implicit declaration of function >> 'irq_data_get_irq_chip_data' [-Werror=implicit-function-declaration] struct gpio_chip *gc = irq_data_get_irq_chip_data(d); ^~ >> drivers/hid/hid-cp2112.c:1065:25: warning: initialization makes pointer from >> integer without a cast [-Wint-conversion] >> drivers/hid/hid-cp2112.c:1068:15: error: dereferencing pointer to incomplete >> type 'struct irq_data' __clear_bit(d->hwirq, &dev->irq_mask); ^~ drivers/hid/hid-cp2112.c: In function 'cp2112_gpio_irq_unmask': drivers/hid/hid-cp2112.c:1073:25: warning: initializ
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Tue, Jul 4, 2017 at 6:43 PM, Masahiro Yamada wrote: > 2017-07-04 21:58 GMT+09:00 William Breathitt Gray : > So, I need to think about how to merge this (if the basic idea of this is OK). > > Maybe, > > [1] Send patches to subsystems (gpio, pinctrl, etc.) for v4.14 > [2] Drop unneeded includes from linux/gpio/driver.h for v4.15 Perhaps, fixing users (drivers!) first. then frameworks / libraries, at last header itself (in each case perhaps follow the split I proposed earlier). My wish is to get gpiolib-acpi patch completely separate from the bunch. -- With Best Regards, Andy Shevchenko
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
2017-07-04 21:58 GMT+09:00 William Breathitt Gray : > On Tue, Jul 04, 2017 at 12:53:34PM +0900, Masahiro Yamada wrote: >>Some of include directives in include/linux/gpio/driver.h are >>unneeded because the header does not need to know the content of >>struct device, irq_chip, etc. Just declare they are structures. >> >>On the other hand, and >>turned out to be necessary for irq_flow_handler_t and spinlock_t, >>respectively. >> >>Each driver should include what it needs without relying on what is >>implicitly included from . This will cut down >>unnecessary header parsing. >> >>Signed-off-by: Masahiro Yamada >>--- >> >> drivers/gpio/gpio-104-dio-48e.c | 1 + >> drivers/gpio/gpio-104-idi-48.c | 1 + >> drivers/gpio/gpio-104-idio-16.c | 1 + >> drivers/gpio/gpio-pci-idio-16.c | 2 ++ >> drivers/gpio/gpio-ws16c48.c | 1 + > > The changes to the above drivers look fine to me: > > Acked-by: William Breathitt Gray > > However, this patch as a whole does too many things; I'd like to see it > split-up logically similar to how Andy Shevchenko suggested in his > reply. That should allow ACKs by respective driver maintainers to be > accounted more properly. > > William Breathitt Gray I was missing a very important thing. is used in various subsystems. I tested only under drivers/gpio/, but drivers/pinctrl/ is one of the biggest source of compile errors. (Probably I will get reports from kbuild test robot.) So, I need to think about how to merge this (if the basic idea of this is OK). Maybe, [1] Send patches to subsystems (gpio, pinctrl, etc.) for v4.14 [2] Drop unneeded includes from linux/gpio/driver.h for v4.15 -- Best Regards Masahiro Yamada
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Tue, Jul 04, 2017 at 12:53:34PM +0900, Masahiro Yamada wrote: >Some of include directives in include/linux/gpio/driver.h are >unneeded because the header does not need to know the content of >struct device, irq_chip, etc. Just declare they are structures. > >On the other hand, and >turned out to be necessary for irq_flow_handler_t and spinlock_t, >respectively. > >Each driver should include what it needs without relying on what is >implicitly included from . This will cut down >unnecessary header parsing. > >Signed-off-by: Masahiro Yamada >--- > > drivers/gpio/gpio-104-dio-48e.c | 1 + > drivers/gpio/gpio-104-idi-48.c | 1 + > drivers/gpio/gpio-104-idio-16.c | 1 + > drivers/gpio/gpio-pci-idio-16.c | 2 ++ > drivers/gpio/gpio-ws16c48.c | 1 + The changes to the above drivers look fine to me: Acked-by: William Breathitt Gray However, this patch as a whole does too many things; I'd like to see it split-up logically similar to how Andy Shevchenko suggested in his reply. That should allow ACKs by respective driver maintainers to be accounted more properly. William Breathitt Gray
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
2017-07-04 19:06 GMT+09:00 Andy Shevchenko : > On Tue, 2017-07-04 at 12:53 +0900, Masahiro Yamada wrote: >> Some of include directives in include/linux/gpio/driver.h are >> unneeded because the header does not need to know the content of >> struct device, irq_chip, etc. Just declare they are structures. >> >> On the other hand, and >> turned out to be necessary for irq_flow_handler_t and spinlock_t, >> respectively. >> >> Each driver should include what it needs without relying on what is >> implicitly included from . This will cut down >> unnecessary header parsing. > > If Linus is okay with the following proposal I would rather go with it, > i.e. logical split the series to > > 1. Fix IRQ related headers inclusion > 2. Fix pinconf-generic.h inclusion > 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) Maybe 4. Fix (platform_)device inclusion But, I do not see much sense to touch headers multiple times. -- Best Regards Masahiro Yamada
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Tue, 2017-07-04 at 12:53 +0900, Masahiro Yamada wrote: > Some of include directives in include/linux/gpio/driver.h are > unneeded because the header does not need to know the content of > struct device, irq_chip, etc. Just declare they are structures. > > On the other hand, and > turned out to be necessary for irq_flow_handler_t and spinlock_t, > respectively. > > Each driver should include what it needs without relying on what is > implicitly included from . This will cut down > unnecessary header parsing. If Linus is okay with the following proposal I would rather go with it, i.e. logical split the series to 1. Fix IRQ related headers inclusion 2. Fix pinconf-generic.h inclusion 3. Fix OF headers inclusion (btw, of_gpio.h is not enough there?) In any case take my tag Reviewed-by: Andy Shevchenko for the drivers I have been involved into development of: drivers/gpio/gpio-dwapb.c | 1 + drivers/gpio/gpio-intel-mid.c | 2 ++ drivers/gpio/gpio-lynxpoint.c | 2 ++ drivers/gpio/gpio-merrifield.c | 4 drivers/gpio/gpio-pca953x.c | 1 + drivers/gpio/gpio-wcove.c | 2 ++ And Acked-by: Andy Shevchenko for drivers/gpio/gpiolib-acpi.c | 1 + > > Signed-off-by: Masahiro Yamada > --- > > drivers/gpio/gpio-104-dio-48e.c | 1 + > drivers/gpio/gpio-104-idi-48.c | 1 + > drivers/gpio/gpio-104-idio-16.c | 1 + > drivers/gpio/gpio-altera-a10sr.c | 2 ++ > drivers/gpio/gpio-altera.c | 3 +++ > drivers/gpio/gpio-aspeed.c | 5 + > drivers/gpio/gpio-ath79.c| 2 ++ > drivers/gpio/gpio-bcm-kona.c | 1 + > drivers/gpio/gpio-clps711x.c | 1 + > drivers/gpio/gpio-crystalcove.c | 2 ++ > drivers/gpio/gpio-dln2.c | 1 + > drivers/gpio/gpio-dwapb.c| 1 + > drivers/gpio/gpio-etraxfs.c | 1 + > drivers/gpio/gpio-f7188x.c | 1 + > drivers/gpio/gpio-ftgpio010.c| 3 +++ > drivers/gpio/gpio-ingenic.c | 1 + > drivers/gpio/gpio-intel-mid.c| 2 ++ > drivers/gpio/gpio-lp873x.c | 1 + > drivers/gpio/gpio-lynxpoint.c| 2 ++ > drivers/gpio/gpio-max732x.c | 1 + > drivers/gpio/gpio-max77620.c | 1 + > drivers/gpio/gpio-menz127.c | 1 + > drivers/gpio/gpio-merrifield.c | 4 > drivers/gpio/gpio-omap.c | 3 +++ > drivers/gpio/gpio-pca953x.c | 1 + > drivers/gpio/gpio-pci-idio-16.c | 2 ++ > drivers/gpio/gpio-pisosr.c | 1 + > drivers/gpio/gpio-pl061.c| 1 + > drivers/gpio/gpio-rcar.c | 1 + > drivers/gpio/gpio-stmpe.c| 2 ++ > drivers/gpio/gpio-tc3589x.c | 3 +++ > drivers/gpio/gpio-tegra.c| 1 + > drivers/gpio/gpio-tps65218.c | 1 + > drivers/gpio/gpio-vf610.c| 3 +++ > drivers/gpio/gpio-vx855.c| 1 + > drivers/gpio/gpio-wcove.c| 2 ++ > drivers/gpio/gpio-wm831x.c | 1 + > drivers/gpio/gpio-wm8994.c | 1 + > drivers/gpio/gpio-ws16c48.c | 1 + > drivers/gpio/gpio-xgene-sb.c | 2 ++ > drivers/gpio/gpio-xlp.c | 1 + > drivers/gpio/gpio-zx.c | 1 + > drivers/gpio/gpio-zynq.c | 3 +++ > drivers/gpio/gpiolib-acpi.c | 1 + > drivers/gpio/gpiolib.c | 2 ++ > include/linux/gpio/driver.h | 11 ++- > 46 files changed, 80 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104- > dio-48e.c > index 598e209efa2d..bdc52be7902a 100644 > --- a/drivers/gpio/gpio-104-dio-48e.c > +++ b/drivers/gpio/gpio-104-dio-48e.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > #include > #include > #include > diff --git a/drivers/gpio/gpio-104-idi-48.c b/drivers/gpio/gpio-104- > idi-48.c > index 51f046e29ff7..7bbb0e8573d1 100644 > --- a/drivers/gpio/gpio-104-idi-48.c > +++ b/drivers/gpio/gpio-104-idi-48.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > #include > #include > #include > diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104- > idio-16.c > index ec2ce34ff473..7e3fc0bf3398 100644 > --- a/drivers/gpio/gpio-104-idio-16.c > +++ b/drivers/gpio/gpio-104-idio-16.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > #include > #include > #include > diff --git a/drivers/gpio/gpio-altera-a10sr.c b/drivers/gpio/gpio- > altera-a10sr.c > index 16a8951b2bed..4cdca9332043 100644 > --- a/drivers/gpio/gpio-altera-a10sr.c > +++ b/drivers/gpio/gpio-altera-a10sr.c > @@ -21,6 +21,8 @@ > #include > #include > #include > +#include > +#include > > /** > * struct altr_a10sr_gpio - Altera Max5 GPIO device private data > structure > diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c > index 17485dc20384..40b26274acaf 100644 > --- a/drivers/gpio/gpio-altera.c > +++ b/drivers/gpio/gpio-altera.c > @@ -17,6 +17,9 @@ > */ > > #include > +#include > +#include > +#include > #include > #include > #include > diff --git a/drivers/
Re: [PATCH] gpio: drop unnecessary includes from include/linux/gpio/driver.h
On Tue, Jul 04, 2017 at 12:53:34PM +0900, Masahiro Yamada wrote: > Some of include directives in include/linux/gpio/driver.h are > unneeded because the header does not need to know the content of > struct device, irq_chip, etc. Just declare they are structures. > > On the other hand, and > turned out to be necessary for irq_flow_handler_t and spinlock_t, > respectively. > > Each driver should include what it needs without relying on what is > implicitly included from . This will cut down > unnecessary header parsing. > > Signed-off-by: Masahiro Yamada > --- > > drivers/gpio/gpio-wm831x.c | 1 + > drivers/gpio/gpio-wm8994.c | 1 + For the Wolfson Micro bits: Acked-by: Charles Keepax Thanks, Charles