tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/linusw/linux-gpio.git devel-gpio-driver-isolation head: 6c5bf689e0dca2a882193a202a96222dcba184e9 commit: f8a386f66ebfc32891f2af31b7474e31cdabd90d [65/66] gpio: Drop driver header from legacy header include config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-9) 7.4.0 reproduce: git checkout f8a386f66ebfc32891f2af31b7474e31cdabd90d # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): In file included from include/linux/gpio.h:62:0, from drivers/leds/leds-pca9532.c:23: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/leds-pca9532.c: At top level: drivers/leds/leds-pca9532.c:48:19: error: field 'gpio' has incomplete type struct gpio_chip gpio; ^~~~ drivers/leds/leds-pca9532.c: In function 'pca9532_gpio_request_pin': drivers/leds/leds-pca9532.c:275:30: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct pca9532_data *data = gpiochip_get_data(gc); ^~~~~~~~~~~~~~~~~ gpio_get_value drivers/leds/leds-pca9532.c:275:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/leds/leds-pca9532.c: In function 'pca9532_gpio_set_value': drivers/leds/leds-pca9532.c:286:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct pca9532_data *data = gpiochip_get_data(gc); ^~~~~~~~~~~~~~~~~ drivers/leds/leds-pca9532.c: In function 'pca9532_gpio_get_value': drivers/leds/leds-pca9532.c:299:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct pca9532_data *data = gpiochip_get_data(gc); ^~~~~~~~~~~~~~~~~ drivers/leds/leds-pca9532.c: In function 'pca9532_destroy_devices': >> drivers/leds/leds-pca9532.c:349:3: error: implicit declaration of function 'gpiochip_remove'; did you mean 'pca9532_remove'? [-Werror=implicit-function-declaration] gpiochip_remove(&data->gpio); ^~~~~~~~~~~~~~~ pca9532_remove drivers/leds/leds-pca9532.c: In function 'pca9532_configure': >> drivers/leds/leds-pca9532.c:449:9: error: implicit declaration of function 'gpiochip_add_data' [-Werror=implicit-function-declaration] err = gpiochip_add_data(&data->gpio, data); ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/gpio.h:62:0, from drivers/leds/leds-tca6507.c:96: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/leds/leds-tca6507.c: At top level: drivers/leds/leds-tca6507.c:191:20: error: field 'gpio' has incomplete type struct gpio_chip gpio; ^~~~ drivers/leds/leds-tca6507.c: In function 'tca6507_gpio_set_value': drivers/leds/leds-tca6507.c:609:29: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct tca6507_chip *tca = gpiochip_get_data(gc); ^~~~~~~~~~~~~~~~~ gpio_get_value drivers/leds/leds-tca6507.c:609:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/leds/leds-tca6507.c: In function 'tca6507_probe_gpios': >> drivers/leds/leds-tca6507.c:661:8: error: implicit declaration of function 'gpiochip_add_data' [-Werror=implicit-function-declaration] err = gpiochip_add_data(&tca->gpio, tca); ^~~~~~~~~~~~~~~~~ drivers/leds/leds-tca6507.c: In function 'tca6507_remove_gpio': >> drivers/leds/leds-tca6507.c:674:3: error: implicit declaration of function 'gpiochip_remove'; did you mean 'klist_remove'? [-Werror=implicit-function-declaration] gpiochip_remove(&tca->gpio); ^~~~~~~~~~~~~~~ klist_remove cc1: some warnings being treated as errors -- In file included from include/linux/gpio.h:62:0, from drivers/pinctrl/sh-pfc/gpio.c:10: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c: At top level: drivers/pinctrl/sh-pfc/gpio.c:31:20: error: field 'gpio_chip' has incomplete type struct gpio_chip gpio_chip; ^~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c: In function 'gpio_to_pfc': drivers/pinctrl/sh-pfc/gpio.c:40:29: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct sh_pfc_chip *chip = gpiochip_get_data(gc); ^~~~~~~~~~~~~~~~~ gpio_get_value drivers/pinctrl/sh-pfc/gpio.c:40:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/pinctrl/sh-pfc/gpio.c: In function 'gpio_pin_direction_output': drivers/pinctrl/sh-pfc/gpio.c:174:21: warning: passing argument 1 of 'gpio_pin_set_value' makes pointer from integer without a cast [-Wint-conversion] gpio_pin_set_value(gpiochip_get_data(gc), offset, value); ^~~~~~~~~~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c:147:13: note: expected 'struct sh_pfc_chip *' but argument is of type 'int' static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset, ^~~~~~~~~~~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c: In function 'gpio_pin_get': drivers/pinctrl/sh-pfc/gpio.c:181:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct sh_pfc_chip *chip = gpiochip_get_data(gc); ^~~~~~~~~~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c: In function 'gpio_pin_set': drivers/pinctrl/sh-pfc/gpio.c:195:21: warning: passing argument 1 of 'gpio_pin_set_value' makes pointer from integer without a cast [-Wint-conversion] gpio_pin_set_value(gpiochip_get_data(gc), offset, value); ^~~~~~~~~~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c:147:13: note: expected 'struct sh_pfc_chip *' but argument is of type 'int' static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset, ^~~~~~~~~~~~~~~~~~ drivers/pinctrl/sh-pfc/gpio.c: In function 'gpio_pin_setup': drivers/pinctrl/sh-pfc/gpio.c:234:4: error: dereferencing pointer to incomplete type 'struct gpio_chip' gc->request = gpio_pin_request; ^~ drivers/pinctrl/sh-pfc/gpio.c: In function 'sh_pfc_add_gpiochip': drivers/pinctrl/sh-pfc/gpio.c:319:8: error: implicit declaration of function 'devm_gpiochip_add_data'; did you mean 'devm_gpiod_put'? [-Werror=implicit-function-declaration] ret = devm_gpiochip_add_data(pfc->dev, &chip->gpio_chip, chip); ^~~~~~~~~~~~~~~~~~~~~~ devm_gpiod_put drivers/pinctrl/sh-pfc/gpio.c: In function 'sh_pfc_register_gpiochip': >> drivers/pinctrl/sh-pfc/gpio.c:386:9: error: implicit declaration of function 'gpiochip_add_pin_range'; did you mean 'pci_iomap_range'? [-Werror=implicit-function-declaration] ret = gpiochip_add_pin_range(&chip->gpio_chip, ^~~~~~~~~~~~~~~~~~~~~~ pci_iomap_range cc1: some warnings being treated as errors -- In file included from include/linux/gpio.h:62:0, from drivers/media/dvb-frontends/cxd2820r_priv.h:16, from drivers/media/dvb-frontends/cxd2820r_core.c:9: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/media/dvb-frontends/cxd2820r_core.c:9:0: drivers/media/dvb-frontends/cxd2820r_priv.h: At top level: drivers/media/dvb-frontends/cxd2820r_priv.h:46:19: error: field 'gpio_chip' has incomplete type struct gpio_chip gpio_chip; ^~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_core.c: In function 'cxd2820r_gpio_direction_output': drivers/media/dvb-frontends/cxd2820r_core.c:424:31: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct cxd2820r_priv *priv = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ gpio_get_value drivers/media/dvb-frontends/cxd2820r_core.c:424:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/media/dvb-frontends/cxd2820r_core.c: In function 'cxd2820r_gpio_set': drivers/media/dvb-frontends/cxd2820r_core.c:438:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct cxd2820r_priv *priv = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_core.c: In function 'cxd2820r_gpio_get': drivers/media/dvb-frontends/cxd2820r_core.c:454:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct cxd2820r_priv *priv = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_core.c: In function 'cxd2820r_probe': >> drivers/media/dvb-frontends/cxd2820r_core.c:661:9: error: implicit declaration of function 'gpiochip_add_data' [-Werror=implicit-function-declaration] ret = gpiochip_add_data(&priv->gpio_chip, priv); ^~~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/cxd2820r_core.c: In function 'cxd2820r_remove': >> drivers/media/dvb-frontends/cxd2820r_core.c:717:3: error: implicit declaration of function 'gpiochip_remove'; did you mean 'klist_remove'? [-Werror=implicit-function-declaration] gpiochip_remove(&priv->gpio_chip); ^~~~~~~~~~~~~~~ klist_remove cc1: some warnings being treated as errors -- In file included from include/linux/gpio.h:62:0, from drivers/mfd/htc-i2cpld.c:23: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/htc-i2cpld.c: At top level: >> drivers/mfd/htc-i2cpld.c:37:26: error: field 'chip_out' has incomplete type struct gpio_chip chip_out; ^~~~~~~~ >> drivers/mfd/htc-i2cpld.c:41:26: error: field 'chip_in' has incomplete type struct gpio_chip chip_in; ^~~~~~~ drivers/mfd/htc-i2cpld.c: In function 'htcpld_chip_set': >> drivers/mfd/htc-i2cpld.c:216:34: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct htcpld_chip *chip_data = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ gpio_get_value >> drivers/mfd/htc-i2cpld.c:216:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/mfd/htc-i2cpld.c: In function 'htcpld_chip_get': drivers/mfd/htc-i2cpld.c:245:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct htcpld_chip *chip_data = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ >> drivers/mfd/htc-i2cpld.c:248:19: error: dereferencing pointer to incomplete type 'struct gpio_chip' if (!strncmp(chip->label, "htcpld-out", 10)) { ^~ drivers/mfd/htc-i2cpld.c: In function 'htcpld_chip_to_irq': drivers/mfd/htc-i2cpld.c:277:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct htcpld_chip *chip_data = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/mfd/htc-i2cpld.c: In function 'htcpld_register_chip_gpio': >> drivers/mfd/htc-i2cpld.c:435:8: error: implicit declaration of function 'gpiochip_add_data' [-Werror=implicit-function-declaration] ret = gpiochip_add_data(&(chip->chip_out), chip); ^~~~~~~~~~~~~~~~~ >> drivers/mfd/htc-i2cpld.c:446:3: error: implicit declaration of function 'gpiochip_remove'; did you mean 'klist_remove'? [-Werror=implicit-function-declaration] gpiochip_remove(&(chip->chip_out)); ^~~~~~~~~~~~~~~ klist_remove cc1: some warnings being treated as errors -- In file included from include/linux/gpio.h:62:0, from drivers/mfd/sm501.c:40: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mfd/sm501.c: At top level: drivers/mfd/sm501.c:43:19: error: field 'gpio' has incomplete type struct gpio_chip gpio; ^~~~ drivers/mfd/sm501.c: In function 'sm501_gpio_get': drivers/mfd/sm501.c:892:35: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct sm501_gpio_chip *smgpio = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ gpio_get_value drivers/mfd/sm501.c:892:35: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/mfd/sm501.c: In function 'sm501_gpio_set': drivers/mfd/sm501.c:923:35: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct sm501_gpio_chip *smchip = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/mfd/sm501.c: In function 'sm501_gpio_input': drivers/mfd/sm501.c:948:35: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct sm501_gpio_chip *smchip = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/mfd/sm501.c: In function 'sm501_gpio_output': drivers/mfd/sm501.c:974:35: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct sm501_gpio_chip *smchip = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/mfd/sm501.c: At top level: drivers/mfd/sm501.c:1006:21: error: variable 'gpio_chip_template' has initializer but incomplete type static const struct gpio_chip gpio_chip_template = { ^~~~~~~~~ drivers/mfd/sm501.c:1007:3: error: 'const struct gpio_chip' has no member named 'ngpio' .ngpio = 32, ^~~~~ drivers/mfd/sm501.c:1007:13: warning: excess elements in struct initializer .ngpio = 32, ^~ drivers/mfd/sm501.c:1007:13: note: (near initialization for 'gpio_chip_template') drivers/mfd/sm501.c:1008:3: error: 'const struct gpio_chip' has no member named 'direction_input' .direction_input = sm501_gpio_input, ^~~~~~~~~~~~~~~ drivers/mfd/sm501.c:1008:21: warning: excess elements in struct initializer .direction_input = sm501_gpio_input, ^~~~~~~~~~~~~~~~ drivers/mfd/sm501.c:1008:21: note: (near initialization for 'gpio_chip_template') drivers/mfd/sm501.c:1009:3: error: 'const struct gpio_chip' has no member named 'direction_output' .direction_output = sm501_gpio_output, ^~~~~~~~~~~~~~~~ drivers/mfd/sm501.c:1009:22: warning: excess elements in struct initializer .direction_output = sm501_gpio_output, ^~~~~~~~~~~~~~~~~ drivers/mfd/sm501.c:1009:22: note: (near initialization for 'gpio_chip_template') drivers/mfd/sm501.c:1010:3: error: 'const struct gpio_chip' has no member named 'set' .set = sm501_gpio_set, ^~~ drivers/mfd/sm501.c:1010:11: warning: excess elements in struct initializer .set = sm501_gpio_set, ^~~~~~~~~~~~~~ drivers/mfd/sm501.c:1010:11: note: (near initialization for 'gpio_chip_template') drivers/mfd/sm501.c:1011:3: error: 'const struct gpio_chip' has no member named 'get' .get = sm501_gpio_get, ^~~ drivers/mfd/sm501.c:1011:11: warning: excess elements in struct initializer .get = sm501_gpio_get, ^~~~~~~~~~~~~~ drivers/mfd/sm501.c:1011:11: note: (near initialization for 'gpio_chip_template') drivers/mfd/sm501.c: In function 'sm501_gpio_register_chip': drivers/mfd/sm501.c:1029:8: error: dereferencing pointer to incomplete type 'struct gpio_chip' gchip->label = "SM501-HIGH"; ^~ drivers/mfd/sm501.c:1039:9: error: implicit declaration of function 'gpiochip_add_data'; did you mean 'tty_audit_add_data'? [-Werror=implicit-function-declaration] return gpiochip_add_data(gchip, chip); ^~~~~~~~~~~~~~~~~ tty_audit_add_data drivers/mfd/sm501.c: In function 'sm501_register_gpio': >> drivers/mfd/sm501.c:1085:2: error: implicit declaration of function 'gpiochip_remove'; did you mean 'klist_remove'? [-Werror=implicit-function-declaration] gpiochip_remove(&gpio->low.gpio); ^~~~~~~~~~~~~~~ klist_remove drivers/mfd/sm501.c: At top level: drivers/mfd/sm501.c:1006:31: error: storage size of 'gpio_chip_template' isn't known static const struct gpio_chip gpio_chip_template = { ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/linux/gpio.h:62:0, from drivers/input/keyboard/adp5588-keys.c:20: include/asm-generic/gpio.h: In function 'gpio_to_chip': include/asm-generic/gpio.h:60:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~ gpio_to_chip include/asm-generic/gpio.h:60:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/keyboard/adp5588-keys.c: At top level: drivers/input/keyboard/adp5588-keys.c:51:19: error: field 'gc' has incomplete type struct gpio_chip gc; ^~ drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_gpio_get_value': drivers/input/keyboard/adp5588-keys.c:76:30: error: implicit declaration of function 'gpiochip_get_data'; did you mean 'gpio_get_value'? [-Werror=implicit-function-declaration] struct adp5588_kpad *kpad = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ gpio_get_value drivers/input/keyboard/adp5588-keys.c:76:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_gpio_set_value': drivers/input/keyboard/adp5588-keys.c:96:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct adp5588_kpad *kpad = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_gpio_direction_input': drivers/input/keyboard/adp5588-keys.c:115:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct adp5588_kpad *kpad = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_gpio_direction_output': drivers/input/keyboard/adp5588-keys.c:133:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] struct adp5588_kpad *kpad = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_gpio_add': >> drivers/input/keyboard/adp5588-keys.c:213:10: error: implicit declaration of function 'gpiochip_add_data' [-Werror=implicit-function-declaration] error = gpiochip_add_data(&kpad->gc, kpad); ^~~~~~~~~~~~~~~~~ drivers/input/keyboard/adp5588-keys.c: In function 'adp5588_gpio_remove': >> drivers/input/keyboard/adp5588-keys.c:254:2: error: implicit declaration of function 'gpiochip_remove'; did you mean 'klist_remove'? [-Werror=implicit-function-declaration] gpiochip_remove(&kpad->gc); ^~~~~~~~~~~~~~~ klist_remove cc1: some warnings being treated as errors .. vim +349 drivers/leds/leds-pca9532.c 3c1ab50d0 Joachim Eastwood 2011-05-24 283 3c1ab50d0 Joachim Eastwood 2011-05-24 284 static void pca9532_gpio_set_value(struct gpio_chip *gc, unsigned offset, int val) 3c1ab50d0 Joachim Eastwood 2011-05-24 285 { dced14675 Linus Walleij 2015-12-08 @286 struct pca9532_data *data = gpiochip_get_data(gc); 3c1ab50d0 Joachim Eastwood 2011-05-24 287 struct pca9532_led *led = &data->leds[offset]; 3c1ab50d0 Joachim Eastwood 2011-05-24 288 3c1ab50d0 Joachim Eastwood 2011-05-24 289 if (val) 3c1ab50d0 Joachim Eastwood 2011-05-24 290 led->state = PCA9532_ON; 3c1ab50d0 Joachim Eastwood 2011-05-24 291 else 3c1ab50d0 Joachim Eastwood 2011-05-24 292 led->state = PCA9532_OFF; 3c1ab50d0 Joachim Eastwood 2011-05-24 293 3c1ab50d0 Joachim Eastwood 2011-05-24 294 pca9532_setled(led); 3c1ab50d0 Joachim Eastwood 2011-05-24 295 } 3c1ab50d0 Joachim Eastwood 2011-05-24 296 3c1ab50d0 Joachim Eastwood 2011-05-24 297 static int pca9532_gpio_get_value(struct gpio_chip *gc, unsigned offset) 3c1ab50d0 Joachim Eastwood 2011-05-24 298 { dced14675 Linus Walleij 2015-12-08 @299 struct pca9532_data *data = gpiochip_get_data(gc); 3c1ab50d0 Joachim Eastwood 2011-05-24 300 unsigned char reg; 3c1ab50d0 Joachim Eastwood 2011-05-24 301 3c1ab50d0 Joachim Eastwood 2011-05-24 302 reg = i2c_smbus_read_byte_data(data->client, PCA9532_REG_INPUT(offset)); 3c1ab50d0 Joachim Eastwood 2011-05-24 303 3c1ab50d0 Joachim Eastwood 2011-05-24 304 return !!(reg & (1 << (offset % 8))); 3c1ab50d0 Joachim Eastwood 2011-05-24 305 } 3c1ab50d0 Joachim Eastwood 2011-05-24 306 3c1ab50d0 Joachim Eastwood 2011-05-24 307 static int pca9532_gpio_direction_input(struct gpio_chip *gc, unsigned offset) 3c1ab50d0 Joachim Eastwood 2011-05-24 308 { 3c1ab50d0 Joachim Eastwood 2011-05-24 309 /* To use as input ensure pin is not driven */ 3c1ab50d0 Joachim Eastwood 2011-05-24 310 pca9532_gpio_set_value(gc, offset, 0); 3c1ab50d0 Joachim Eastwood 2011-05-24 311 3c1ab50d0 Joachim Eastwood 2011-05-24 312 return 0; 3c1ab50d0 Joachim Eastwood 2011-05-24 313 } 3c1ab50d0 Joachim Eastwood 2011-05-24 314 3c1ab50d0 Joachim Eastwood 2011-05-24 315 static int pca9532_gpio_direction_output(struct gpio_chip *gc, unsigned offset, int val) 3c1ab50d0 Joachim Eastwood 2011-05-24 316 { 3c1ab50d0 Joachim Eastwood 2011-05-24 317 pca9532_gpio_set_value(gc, offset, val); 3c1ab50d0 Joachim Eastwood 2011-05-24 318 3c1ab50d0 Joachim Eastwood 2011-05-24 319 return 0; 3c1ab50d0 Joachim Eastwood 2011-05-24 320 } 3c1ab50d0 Joachim Eastwood 2011-05-24 321 #endif /* CONFIG_LEDS_PCA9532_GPIO */ 3c1ab50d0 Joachim Eastwood 2011-05-24 322 3c1ab50d0 Joachim Eastwood 2011-05-24 323 static int pca9532_destroy_devices(struct pca9532_data *data, int n_devs) 125c71352 Axel Lin 2011-01-12 324 { 125c71352 Axel Lin 2011-01-12 325 int i = n_devs; 125c71352 Axel Lin 2011-01-12 326 125c71352 Axel Lin 2011-01-12 327 if (!data) 3c1ab50d0 Joachim Eastwood 2011-05-24 328 return -EINVAL; 125c71352 Axel Lin 2011-01-12 329 125c71352 Axel Lin 2011-01-12 330 while (--i >= 0) { 125c71352 Axel Lin 2011-01-12 331 switch (data->leds[i].type) { 125c71352 Axel Lin 2011-01-12 332 case PCA9532_TYPE_NONE: 3c1ab50d0 Joachim Eastwood 2011-05-24 333 case PCA9532_TYPE_GPIO: 125c71352 Axel Lin 2011-01-12 334 break; 125c71352 Axel Lin 2011-01-12 335 case PCA9532_TYPE_LED: 125c71352 Axel Lin 2011-01-12 336 led_classdev_unregister(&data->leds[i].ldev); 125c71352 Axel Lin 2011-01-12 337 break; 125c71352 Axel Lin 2011-01-12 338 case PCA9532_TYPE_N2100_BEEP: 125c71352 Axel Lin 2011-01-12 339 if (data->idev != NULL) { 125c71352 Axel Lin 2011-01-12 340 cancel_work_sync(&data->work); 125c71352 Axel Lin 2011-01-12 341 data->idev = NULL; 125c71352 Axel Lin 2011-01-12 342 } 125c71352 Axel Lin 2011-01-12 343 break; 125c71352 Axel Lin 2011-01-12 344 } 125c71352 Axel Lin 2011-01-12 345 } 3c1ab50d0 Joachim Eastwood 2011-05-24 346 3c1ab50d0 Joachim Eastwood 2011-05-24 347 #ifdef CONFIG_LEDS_PCA9532_GPIO 58383c784 Linus Walleij 2015-11-04 348 if (data->gpio.parent) 88d5e520a abdoulaye berthe 2014-07-12 @349 gpiochip_remove(&data->gpio); 3c1ab50d0 Joachim Eastwood 2011-05-24 350 #endif 3c1ab50d0 Joachim Eastwood 2011-05-24 351 3c1ab50d0 Joachim Eastwood 2011-05-24 352 return 0; 125c71352 Axel Lin 2011-01-12 353 } 125c71352 Axel Lin 2011-01-12 354 e14fa8243 Riku Voipio 2008-05-31 355 static int pca9532_configure(struct i2c_client *client, e14fa8243 Riku Voipio 2008-05-31 356 struct pca9532_data *data, struct pca9532_platform_data *pdata) e14fa8243 Riku Voipio 2008-05-31 357 { e14fa8243 Riku Voipio 2008-05-31 358 int i, err = 0; 3c1ab50d0 Joachim Eastwood 2011-05-24 359 int gpios = 0; 3dbf622c1 Jan Weitzel 2011-05-24 360 u8 maxleds = data->chip_info->num_leds; e14fa8243 Riku Voipio 2008-05-31 361 e14fa8243 Riku Voipio 2008-05-31 362 for (i = 0; i < 2; i++) { e14fa8243 Riku Voipio 2008-05-31 363 data->pwm[i] = pdata->pwm[i]; e14fa8243 Riku Voipio 2008-05-31 364 data->psc[i] = pdata->psc[i]; 3dbf622c1 Jan Weitzel 2011-05-24 365 i2c_smbus_write_byte_data(client, PCA9532_REG_PWM(maxleds, i), e14fa8243 Riku Voipio 2008-05-31 366 data->pwm[i]); 3dbf622c1 Jan Weitzel 2011-05-24 367 i2c_smbus_write_byte_data(client, PCA9532_REG_PSC(maxleds, i), e14fa8243 Riku Voipio 2008-05-31 368 data->psc[i]); e14fa8243 Riku Voipio 2008-05-31 369 } e14fa8243 Riku Voipio 2008-05-31 370 3dbf622c1 Jan Weitzel 2011-05-24 371 for (i = 0; i < data->chip_info->num_leds; i++) { e14fa8243 Riku Voipio 2008-05-31 372 struct pca9532_led *led = &data->leds[i]; e14fa8243 Riku Voipio 2008-05-31 373 struct pca9532_led *pled = &pdata->leds[i]; e14fa8243 Riku Voipio 2008-05-31 374 led->client = client; e14fa8243 Riku Voipio 2008-05-31 375 led->id = i; e14fa8243 Riku Voipio 2008-05-31 376 led->type = pled->type; e14fa8243 Riku Voipio 2008-05-31 377 switch (led->type) { e14fa8243 Riku Voipio 2008-05-31 378 case PCA9532_TYPE_NONE: e14fa8243 Riku Voipio 2008-05-31 379 break; 3c1ab50d0 Joachim Eastwood 2011-05-24 380 case PCA9532_TYPE_GPIO: 3c1ab50d0 Joachim Eastwood 2011-05-24 381 gpios++; 3c1ab50d0 Joachim Eastwood 2011-05-24 382 break; e14fa8243 Riku Voipio 2008-05-31 383 case PCA9532_TYPE_LED: 28c5fe990 Felix Brack 2017-04-13 384 if (pled->state == PCA9532_KEEP) 28c5fe990 Felix Brack 2017-04-13 385 led->state = pca9532_getled(led); 28c5fe990 Felix Brack 2017-04-13 386 else e14fa8243 Riku Voipio 2008-05-31 387 led->state = pled->state; e14fa8243 Riku Voipio 2008-05-31 388 led->name = pled->name; e14fa8243 Riku Voipio 2008-05-31 389 led->ldev.name = led->name; 90a5537bd Felix Brack 2016-10-26 390 led->ldev.default_trigger = pled->default_trigger; e14fa8243 Riku Voipio 2008-05-31 391 led->ldev.brightness = LED_OFF; 00a88a19d Andrew Lunn 2015-08-20 392 led->ldev.brightness_set_blocking = 00a88a19d Andrew Lunn 2015-08-20 393 pca9532_set_brightness; e14fa8243 Riku Voipio 2008-05-31 394 led->ldev.blink_set = pca9532_set_blink; f785d022a Sven Wegener 2008-12-03 395 err = led_classdev_register(&client->dev, &led->ldev); f785d022a Sven Wegener 2008-12-03 396 if (err < 0) { e14fa8243 Riku Voipio 2008-05-31 397 dev_err(&client->dev, e14fa8243 Riku Voipio 2008-05-31 398 "couldn't register LED %s\n", e14fa8243 Riku Voipio 2008-05-31 399 led->name); e14fa8243 Riku Voipio 2008-05-31 400 goto exit; e14fa8243 Riku Voipio 2008-05-31 401 } e14fa8243 Riku Voipio 2008-05-31 402 pca9532_setled(led); e14fa8243 Riku Voipio 2008-05-31 403 break; e14fa8243 Riku Voipio 2008-05-31 404 case PCA9532_TYPE_N2100_BEEP: e14fa8243 Riku Voipio 2008-05-31 405 BUG_ON(data->idev); e14fa8243 Riku Voipio 2008-05-31 406 led->state = PCA9532_PWM1; e14fa8243 Riku Voipio 2008-05-31 407 pca9532_setled(led); 8614fb466 Axel Lin 2012-12-25 408 data->idev = devm_input_allocate_device(&client->dev); e14fa8243 Riku Voipio 2008-05-31 409 if (data->idev == NULL) { e14fa8243 Riku Voipio 2008-05-31 410 err = -ENOMEM; e14fa8243 Riku Voipio 2008-05-31 411 goto exit; e14fa8243 Riku Voipio 2008-05-31 412 } e14fa8243 Riku Voipio 2008-05-31 413 data->idev->name = pled->name; e14fa8243 Riku Voipio 2008-05-31 414 data->idev->phys = "i2c/pca9532"; e14fa8243 Riku Voipio 2008-05-31 415 data->idev->id.bustype = BUS_HOST; e14fa8243 Riku Voipio 2008-05-31 416 data->idev->id.vendor = 0x001f; e14fa8243 Riku Voipio 2008-05-31 417 data->idev->id.product = 0x0001; e14fa8243 Riku Voipio 2008-05-31 418 data->idev->id.version = 0x0100; e14fa8243 Riku Voipio 2008-05-31 419 data->idev->evbit[0] = BIT_MASK(EV_SND); e14fa8243 Riku Voipio 2008-05-31 420 data->idev->sndbit[0] = BIT_MASK(SND_BELL) | e14fa8243 Riku Voipio 2008-05-31 421 BIT_MASK(SND_TONE); e14fa8243 Riku Voipio 2008-05-31 422 data->idev->event = pca9532_event; e14fa8243 Riku Voipio 2008-05-31 423 input_set_drvdata(data->idev, data); 934cd3f97 Riku Voipio 2008-12-03 424 INIT_WORK(&data->work, pca9532_input_work); e14fa8243 Riku Voipio 2008-05-31 425 err = input_register_device(data->idev); e14fa8243 Riku Voipio 2008-05-31 426 if (err) { 934cd3f97 Riku Voipio 2008-12-03 427 cancel_work_sync(&data->work); e14fa8243 Riku Voipio 2008-05-31 428 data->idev = NULL; e14fa8243 Riku Voipio 2008-05-31 429 goto exit; e14fa8243 Riku Voipio 2008-05-31 430 } e14fa8243 Riku Voipio 2008-05-31 431 break; e14fa8243 Riku Voipio 2008-05-31 432 } e14fa8243 Riku Voipio 2008-05-31 433 } 3c1ab50d0 Joachim Eastwood 2011-05-24 434 3c1ab50d0 Joachim Eastwood 2011-05-24 435 #ifdef CONFIG_LEDS_PCA9532_GPIO 3c1ab50d0 Joachim Eastwood 2011-05-24 436 if (gpios) { 3c1ab50d0 Joachim Eastwood 2011-05-24 437 data->gpio.label = "gpio-pca9532"; 3c1ab50d0 Joachim Eastwood 2011-05-24 438 data->gpio.direction_input = pca9532_gpio_direction_input; 3c1ab50d0 Joachim Eastwood 2011-05-24 439 data->gpio.direction_output = pca9532_gpio_direction_output; 3c1ab50d0 Joachim Eastwood 2011-05-24 440 data->gpio.set = pca9532_gpio_set_value; 3c1ab50d0 Joachim Eastwood 2011-05-24 441 data->gpio.get = pca9532_gpio_get_value; 3c1ab50d0 Joachim Eastwood 2011-05-24 442 data->gpio.request = pca9532_gpio_request_pin; 3c1ab50d0 Joachim Eastwood 2011-05-24 443 data->gpio.can_sleep = 1; 3c1ab50d0 Joachim Eastwood 2011-05-24 444 data->gpio.base = pdata->gpio_base; 3dbf622c1 Jan Weitzel 2011-05-24 445 data->gpio.ngpio = data->chip_info->num_leds; 58383c784 Linus Walleij 2015-11-04 446 data->gpio.parent = &client->dev; 3c1ab50d0 Joachim Eastwood 2011-05-24 447 data->gpio.owner = THIS_MODULE; 3c1ab50d0 Joachim Eastwood 2011-05-24 448 dced14675 Linus Walleij 2015-12-08 @449 err = gpiochip_add_data(&data->gpio, data); 3c1ab50d0 Joachim Eastwood 2011-05-24 450 if (err) { 3c1ab50d0 Joachim Eastwood 2011-05-24 451 /* Use data->gpio.dev as a flag for freeing gpiochip */ 58383c784 Linus Walleij 2015-11-04 452 data->gpio.parent = NULL; 3c1ab50d0 Joachim Eastwood 2011-05-24 453 dev_warn(&client->dev, "could not add gpiochip\n"); 3c1ab50d0 Joachim Eastwood 2011-05-24 454 } else { 3c1ab50d0 Joachim Eastwood 2011-05-24 455 dev_info(&client->dev, "gpios %i...%i\n", 3c1ab50d0 Joachim Eastwood 2011-05-24 456 data->gpio.base, data->gpio.base + 3c1ab50d0 Joachim Eastwood 2011-05-24 457 data->gpio.ngpio - 1); 3c1ab50d0 Joachim Eastwood 2011-05-24 458 } 3c1ab50d0 Joachim Eastwood 2011-05-24 459 } 3c1ab50d0 Joachim Eastwood 2011-05-24 460 #endif 3c1ab50d0 Joachim Eastwood 2011-05-24 461 e14fa8243 Riku Voipio 2008-05-31 462 return 0; e14fa8243 Riku Voipio 2008-05-31 463 e14fa8243 Riku Voipio 2008-05-31 464 exit: 125c71352 Axel Lin 2011-01-12 465 pca9532_destroy_devices(data, i); e14fa8243 Riku Voipio 2008-05-31 466 return err; e14fa8243 Riku Voipio 2008-05-31 467 } e14fa8243 Riku Voipio 2008-05-31 468 :::::: The code at line 349 was first introduced by commit :::::: 88d5e520aa9701eb3e4f46165e02097cc03d363a driver:gpio remove all usage of gpio_remove retval in driver :::::: TO: abdoulaye berthe <berthe.ab@xxxxxxxxx> :::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip