linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 932/8744] arch/mips/ar7/gpio.c:19:19: error: field has incomplete type 'struct gpio_chip'
@ 2023-04-04  0:58 kernel test robot
  2023-04-04  7:22 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-04-04  0:58 UTC (permalink / raw)
  To: Linus Walleij
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Andy Shevchenko

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@intel.com/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@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304040830.kPrP1Qew-lkp@intel.com/

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@openwrt.org>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 932/8744] arch/mips/ar7/gpio.c:19:19: error: field has incomplete type 'struct gpio_chip'
  2023-04-04  0:58 [linux-next:master 932/8744] arch/mips/ar7/gpio.c:19:19: error: field has incomplete type 'struct gpio_chip' kernel test robot
@ 2023-04-04  7:22 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2023-04-04  7:22 UTC (permalink / raw)
  To: kernel test robot
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Andy Shevchenko

On Tue, Apr 4, 2023 at 2:58 AM kernel test robot <lkp@intel.com> wrote:

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

Yeah it is fixed somewhere:

commit 424b21e01aafc98a9c086f00b3ad1874302b92fc
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed Mar 8 15:52:53 2023 +0100

    mips: ar7: include linux/gpio/driver.h

(...)

Yours,
Linus Walleij


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-04  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04  0:58 [linux-next:master 932/8744] arch/mips/ar7/gpio.c:19:19: error: field has incomplete type 'struct gpio_chip' kernel test robot
2023-04-04  7:22 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox