[linux-next:master 932/8744] arch/mips/ar7/gpio.c:19:19: error: field has incomplete type 'struct gpio_chip'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   31bd35b66249699343d2416658f57e97314a433a
commit: 21d9526d13b5467b0a6532e5a8b0eb04c01ce326 [932/8744] gpiolib: Make the legacy <linux/gpio.h> consumer-only
config: mips-randconfig-r035-20230402 (https://download.01.org/0day-ci/archive/20230404/202304040830.kPrP1Qew-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mipsel-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=21d9526d13b5467b0a6532e5a8b0eb04c01ce326
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 21d9526d13b5467b0a6532e5a8b0eb04c01ce326
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304040830.kPrP1Qew-lkp@xxxxxxxxx/

Note: the linux-next/master HEAD 31bd35b66249699343d2416658f57e97314a433a builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

>> arch/mips/ar7/gpio.c:19:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip        chip;
                                   ^
   arch/mips/ar7/gpio.c:19:9: note: forward declaration of 'struct gpio_chip'
           struct gpio_chip        chip;
                  ^
>> arch/mips/ar7/gpio.c:24:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
>> arch/mips/ar7/gpio.c:24:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:32:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:32:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:42:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:42:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:55:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:55:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:68:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:68:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:78:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:78:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:93:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:93:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:105:31: error: call to undeclared function 'gpiochip_get_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                        ^
   arch/mips/ar7/gpio.c:105:24: error: incompatible integer to pointer conversion initializing 'struct ar7_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
           struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
>> arch/mips/ar7/gpio.c:318:8: error: call to undeclared function 'gpiochip_add_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           ret = gpiochip_add_data(&gpch->chip, gpch);
                 ^
   18 errors generated.


vim +19 arch/mips/ar7/gpio.c

7ca5dc145bc7da Florian Fainelli 2009-06-24  16  
5f3c909881d5de Florian Fainelli 2010-01-03  17  struct ar7_gpio_chip {
5f3c909881d5de Florian Fainelli 2010-01-03  18  	void __iomem		*regs;
5f3c909881d5de Florian Fainelli 2010-01-03 @19  	struct gpio_chip	chip;
5f3c909881d5de Florian Fainelli 2010-01-03  20  };
7ca5dc145bc7da Florian Fainelli 2009-06-24  21  
5f3c909881d5de Florian Fainelli 2010-01-03  22  static int ar7_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
7ca5dc145bc7da Florian Fainelli 2009-06-24  23  {
1b2766fb496c46 Linus Walleij    2015-12-08 @24  	struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
5f3c909881d5de Florian Fainelli 2010-01-03  25  	void __iomem *gpio_in = gpch->regs + AR7_GPIO_INPUT;
7ca5dc145bc7da Florian Fainelli 2009-06-24  26  
249e573d99ab59 Linus Walleij    2015-12-22  27  	return !!(readl(gpio_in) & (1 << gpio));
5f3c909881d5de Florian Fainelli 2010-01-03  28  }
5f3c909881d5de Florian Fainelli 2010-01-03  29  

:::::: The code at line 19 was first introduced by commit
:::::: 5f3c909881d5deebb9a3ddc836a15937e76daefc MIPS: AR7: Implement gpiolib

:::::: TO: Florian Fainelli <florian@xxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux