[linux-next:master 931/9377] arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type

[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:   8417c8f5007bf4567ccffda850a3157c7d905f67
commit: 21d9526d13b5467b0a6532e5a8b0eb04c01ce326 [931/9377] gpiolib: Make the legacy <linux/gpio.h> consumer-only
config: mips-randconfig-r004-20230403 (https://download.01.org/0day-ci/archive/20230405/202304051646.5QtRQQau-lkp@xxxxxxxxx/config)
compiler: mipsel-linux-gcc (GCC) 12.1.0
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
        # 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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/ar7/

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/202304051646.5QtRQQau-lkp@xxxxxxxxx/

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

All errors (new ones prefixed by >>):

>> arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
      19 |         struct gpio_chip        chip;
         |                                 ^~~~
   arch/mips/ar7/gpio.c: In function 'ar7_gpio_get_value':
>> arch/mips/ar7/gpio.c:24:38: error: implicit declaration of function 'gpiochip_get_data' [-Werror=implicit-function-declaration]
      24 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c:24:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   arch/mips/ar7/gpio.c: In function 'titan_gpio_get_value':
   arch/mips/ar7/gpio.c:32:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      32 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'ar7_gpio_set_value':
   arch/mips/ar7/gpio.c:42:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      42 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'titan_gpio_set_value':
   arch/mips/ar7/gpio.c:55:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      55 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'ar7_gpio_direction_input':
   arch/mips/ar7/gpio.c:68:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      68 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'titan_gpio_direction_input':
   arch/mips/ar7/gpio.c:78:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      78 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'ar7_gpio_direction_output':
   arch/mips/ar7/gpio.c:93:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      93 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'titan_gpio_direction_output':
   arch/mips/ar7/gpio.c:105:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     105 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
         |                                      ^~~~~~~~~~~~~~~~~
   arch/mips/ar7/gpio.c: In function 'ar7_gpio_init':
>> arch/mips/ar7/gpio.c:318:15: error: implicit declaration of function 'gpiochip_add_data' [-Werror=implicit-function-declaration]
     318 |         ret = gpiochip_add_data(&gpch->chip, gpch);
         |               ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


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

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