[gpio:devel-gpio-driver-isolation 30/31] drivers//mfd/sm501.c:1082:2: error: implicit declaration of function 'gpiochip_remove'; did you mean 'klist_remove'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/linusw/linux-gpio.git devel-gpio-driver-isolation
head:   95af28c7af12975e4c4ccb3d33974fadc8b4656a
commit: 6a690b9e1ee32cfe12a86891f5db2dabcca4e5cf [30/31] gpio: Drop driver header from legacy header include
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 6a690b9e1ee32cfe12a86891f5db2dabcca4e5cf
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers//mfd/sm501.c:40:19: error: field 'gpio' has incomplete type
     struct gpio_chip gpio;
                      ^~~~
   drivers//mfd/sm501.c: In function 'sm501_gpio_get':
   drivers//mfd/sm501.c:889: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:889: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:920: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:945: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:971: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:1003:21: error: variable 'gpio_chip_template' has initializer but incomplete type
    static const struct gpio_chip gpio_chip_template = {
                        ^~~~~~~~~
   drivers//mfd/sm501.c:1004:3: error: 'const struct gpio_chip' has no member named 'ngpio'
     .ngpio   = 32,
      ^~~~~
   drivers//mfd/sm501.c:1004:13: warning: excess elements in struct initializer
     .ngpio   = 32,
                ^~
   drivers//mfd/sm501.c:1004:13: note: (near initialization for 'gpio_chip_template')
   drivers//mfd/sm501.c:1005:3: error: 'const struct gpio_chip' has no member named 'direction_input'
     .direction_input = sm501_gpio_input,
      ^~~~~~~~~~~~~~~
   drivers//mfd/sm501.c:1005:21: warning: excess elements in struct initializer
     .direction_input = sm501_gpio_input,
                        ^~~~~~~~~~~~~~~~
   drivers//mfd/sm501.c:1005:21: note: (near initialization for 'gpio_chip_template')
   drivers//mfd/sm501.c:1006:3: error: 'const struct gpio_chip' has no member named 'direction_output'
     .direction_output = sm501_gpio_output,
      ^~~~~~~~~~~~~~~~
   drivers//mfd/sm501.c:1006:22: warning: excess elements in struct initializer
     .direction_output = sm501_gpio_output,
                         ^~~~~~~~~~~~~~~~~
   drivers//mfd/sm501.c:1006:22: note: (near initialization for 'gpio_chip_template')
   drivers//mfd/sm501.c:1007:3: error: 'const struct gpio_chip' has no member named 'set'
     .set   = sm501_gpio_set,
      ^~~
   drivers//mfd/sm501.c:1007:11: warning: excess elements in struct initializer
     .set   = sm501_gpio_set,
              ^~~~~~~~~~~~~~
   drivers//mfd/sm501.c:1007:11: note: (near initialization for 'gpio_chip_template')
   drivers//mfd/sm501.c:1008:3: error: 'const struct gpio_chip' has no member named 'get'
     .get   = sm501_gpio_get,
      ^~~
   drivers//mfd/sm501.c:1008:11: warning: excess elements in struct initializer
     .get   = sm501_gpio_get,
              ^~~~~~~~~~~~~~
   drivers//mfd/sm501.c:1008:11: note: (near initialization for 'gpio_chip_template')
   drivers//mfd/sm501.c: In function 'sm501_gpio_register_chip':
   drivers//mfd/sm501.c:1026:8: error: dereferencing pointer to incomplete type 'struct gpio_chip'
      gchip->label  = "SM501-HIGH";
           ^~
   drivers//mfd/sm501.c:1036: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:1082: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:1003: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

vim +1082 drivers//mfd/sm501.c

f61be273d3699d Ben Dooks        2008-07-25  1010  
f791be492f76de Bill Pemberton   2012-11-19  1011  static int sm501_gpio_register_chip(struct sm501_devdata *sm,
f61be273d3699d Ben Dooks        2008-07-25  1012  					      struct sm501_gpio *gpio,
f61be273d3699d Ben Dooks        2008-07-25  1013  					      struct sm501_gpio_chip *chip)
f61be273d3699d Ben Dooks        2008-07-25  1014  {
f61be273d3699d Ben Dooks        2008-07-25  1015  	struct sm501_platdata *pdata = sm->platdata;
f61be273d3699d Ben Dooks        2008-07-25  1016  	struct gpio_chip *gchip = &chip->gpio;
60e540d617b40e Arnaud Patard    2008-07-25  1017  	int base = pdata->gpio_base;
f61be273d3699d Ben Dooks        2008-07-25  1018  
28130bea3bcfef Ben Dooks        2008-07-25  1019  	chip->gpio = gpio_chip_template;
f61be273d3699d Ben Dooks        2008-07-25  1020  
f61be273d3699d Ben Dooks        2008-07-25  1021  	if (chip == &gpio->high) {
60e540d617b40e Arnaud Patard    2008-07-25  1022  		if (base > 0)
f61be273d3699d Ben Dooks        2008-07-25  1023  			base += 32;
f61be273d3699d Ben Dooks        2008-07-25  1024  		chip->regbase = gpio->regs + SM501_GPIO_DATA_HIGH;
98325f8f8e9508 Ben Dooks        2009-01-10  1025  		chip->control = sm->regs + SM501_GPIO63_32_CONTROL;
f61be273d3699d Ben Dooks        2008-07-25 @1026  		gchip->label  = "SM501-HIGH";
f61be273d3699d Ben Dooks        2008-07-25  1027  	} else {
f61be273d3699d Ben Dooks        2008-07-25  1028  		chip->regbase = gpio->regs + SM501_GPIO_DATA_LOW;
98325f8f8e9508 Ben Dooks        2009-01-10  1029  		chip->control = sm->regs + SM501_GPIO31_0_CONTROL;
f61be273d3699d Ben Dooks        2008-07-25  1030  		gchip->label  = "SM501-LOW";
f61be273d3699d Ben Dooks        2008-07-25  1031  	}
f61be273d3699d Ben Dooks        2008-07-25  1032  
f61be273d3699d Ben Dooks        2008-07-25  1033  	gchip->base   = base;
f61be273d3699d Ben Dooks        2008-07-25  1034  	chip->ourgpio = gpio;
f61be273d3699d Ben Dooks        2008-07-25  1035  
3a504105f0e4cf Linus Walleij    2016-03-30  1036  	return gpiochip_add_data(gchip, chip);
f61be273d3699d Ben Dooks        2008-07-25  1037  }
f61be273d3699d Ben Dooks        2008-07-25  1038  
f791be492f76de Bill Pemberton   2012-11-19  1039  static int sm501_register_gpio(struct sm501_devdata *sm)
f61be273d3699d Ben Dooks        2008-07-25  1040  {
f61be273d3699d Ben Dooks        2008-07-25  1041  	struct sm501_gpio *gpio = &sm->gpio;
f61be273d3699d Ben Dooks        2008-07-25  1042  	resource_size_t iobase = sm->io_res->start + SM501_GPIO;
f61be273d3699d Ben Dooks        2008-07-25  1043  	int ret;
f61be273d3699d Ben Dooks        2008-07-25  1044  
f61be273d3699d Ben Dooks        2008-07-25  1045  	dev_dbg(sm->dev, "registering gpio block %08llx\n",
f61be273d3699d Ben Dooks        2008-07-25  1046  		(unsigned long long)iobase);
f61be273d3699d Ben Dooks        2008-07-25  1047  
f61be273d3699d Ben Dooks        2008-07-25  1048  	spin_lock_init(&gpio->lock);
f61be273d3699d Ben Dooks        2008-07-25  1049  
f61be273d3699d Ben Dooks        2008-07-25  1050  	gpio->regs_res = request_mem_region(iobase, 0x20, "sm501-gpio");
4202151f5d4ad8 Markus Elfring   2018-03-08  1051  	if (!gpio->regs_res) {
f61be273d3699d Ben Dooks        2008-07-25  1052  		dev_err(sm->dev, "gpio: failed to request region\n");
f61be273d3699d Ben Dooks        2008-07-25  1053  		return -ENXIO;
f61be273d3699d Ben Dooks        2008-07-25  1054  	}
f61be273d3699d Ben Dooks        2008-07-25  1055  
f61be273d3699d Ben Dooks        2008-07-25  1056  	gpio->regs = ioremap(iobase, 0x20);
4202151f5d4ad8 Markus Elfring   2018-03-08  1057  	if (!gpio->regs) {
f61be273d3699d Ben Dooks        2008-07-25  1058  		dev_err(sm->dev, "gpio: failed to remap registers\n");
f61be273d3699d Ben Dooks        2008-07-25  1059  		ret = -ENXIO;
28130bea3bcfef Ben Dooks        2008-07-25  1060  		goto err_claimed;
f61be273d3699d Ben Dooks        2008-07-25  1061  	}
f61be273d3699d Ben Dooks        2008-07-25  1062  
f61be273d3699d Ben Dooks        2008-07-25  1063  	/* Register both our chips. */
f61be273d3699d Ben Dooks        2008-07-25  1064  
f61be273d3699d Ben Dooks        2008-07-25  1065  	ret = sm501_gpio_register_chip(sm, gpio, &gpio->low);
f61be273d3699d Ben Dooks        2008-07-25  1066  	if (ret) {
f61be273d3699d Ben Dooks        2008-07-25  1067  		dev_err(sm->dev, "failed to add low chip\n");
f61be273d3699d Ben Dooks        2008-07-25  1068  		goto err_mapped;
f61be273d3699d Ben Dooks        2008-07-25  1069  	}
f61be273d3699d Ben Dooks        2008-07-25  1070  
f61be273d3699d Ben Dooks        2008-07-25  1071  	ret = sm501_gpio_register_chip(sm, gpio, &gpio->high);
f61be273d3699d Ben Dooks        2008-07-25  1072  	if (ret) {
f61be273d3699d Ben Dooks        2008-07-25  1073  		dev_err(sm->dev, "failed to add high chip\n");
f61be273d3699d Ben Dooks        2008-07-25  1074  		goto err_low_chip;
f61be273d3699d Ben Dooks        2008-07-25  1075  	}
f61be273d3699d Ben Dooks        2008-07-25  1076  
f61be273d3699d Ben Dooks        2008-07-25  1077  	gpio->registered = 1;
f61be273d3699d Ben Dooks        2008-07-25  1078  
f61be273d3699d Ben Dooks        2008-07-25  1079  	return 0;
f61be273d3699d Ben Dooks        2008-07-25  1080  
f61be273d3699d Ben Dooks        2008-07-25  1081   err_low_chip:
88d5e520aa9701 abdoulaye berthe 2014-07-12 @1082  	gpiochip_remove(&gpio->low.gpio);
f61be273d3699d Ben Dooks        2008-07-25  1083  
f61be273d3699d Ben Dooks        2008-07-25  1084   err_mapped:
28130bea3bcfef Ben Dooks        2008-07-25  1085  	iounmap(gpio->regs);
28130bea3bcfef Ben Dooks        2008-07-25  1086  
28130bea3bcfef Ben Dooks        2008-07-25  1087   err_claimed:
f61be273d3699d Ben Dooks        2008-07-25  1088  	release_resource(gpio->regs_res);
f61be273d3699d Ben Dooks        2008-07-25  1089  	kfree(gpio->regs_res);
f61be273d3699d Ben Dooks        2008-07-25  1090  
f61be273d3699d Ben Dooks        2008-07-25  1091  	return ret;
f61be273d3699d Ben Dooks        2008-07-25  1092  }
f61be273d3699d Ben Dooks        2008-07-25  1093  

:::::: The code at line 1082 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


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux