[gpio:gpiochip-no-driver-h 1/1] include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpiochip-no-driver-h
head:   2ade795a7e0399423f07a9b077b820792be52f5c
commit: 2ade795a7e0399423f07a9b077b820792be52f5c [1/1] See what explodes if we apply this patch
config: arm-randconfig-r013-20200701 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ca464639a1c9dd3944eb055ffd2796e8c2e7639f)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git checkout 2ade795a7e0399423f07a9b077b820792be52f5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All error/warnings (new ones prefixed by >>):

   In file included from drivers/extcon/extcon-arizona.c:15:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.
--
   In file included from drivers/extcon/extcon-usb-gpio.c:10:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/extcon/extcon-usb-gpio.c:17:
   In file included from include/linux/of_gpio.h:14:
   include/linux/gpio/driver.h:744:19: error: conflicting types for 'gpiod_to_chip'
   struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
                     ^
   include/asm-generic/gpio.h:58:9: note: previous implicit declaration is here
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   1 warning and 2 errors generated.
--
   In file included from drivers/pinctrl/core.c:30:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/core.c:339:45: error: incomplete definition of type 'struct gpio_chip'
                           if (range->base + range->npins - 1 < chip->base ||
                                                                ~~~~^
   include/linux/pinctrl/pinctrl.h:26:8: note: forward declaration of 'struct gpio_chip'
   struct gpio_chip;
          ^
   drivers/pinctrl/core.c:340:26: error: incomplete definition of type 'struct gpio_chip'
                               range->base > chip->base + chip->ngpio - 1)
                                             ~~~~^
   include/linux/pinctrl/pinctrl.h:26:8: note: forward declaration of 'struct gpio_chip'
   struct gpio_chip;
          ^
   drivers/pinctrl/core.c:340:39: error: incomplete definition of type 'struct gpio_chip'
                               range->base > chip->base + chip->ngpio - 1)
                                                          ~~~~^
   include/linux/pinctrl/pinctrl.h:26:8: note: forward declaration of 'struct gpio_chip'
   struct gpio_chip;
          ^
   1 warning and 4 errors generated.
--
   In file included from drivers/gpio/gpio-max7300.c:13:
   In file included from include/linux/spi/max7301.h:5:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpio/gpio-max7300.c:13:
>> include/linux/spi/max7301.h:16:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip chip;
                            ^
   include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip'
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                        ^
   1 warning and 2 errors generated.
--
   In file included from drivers/gpio/gpio-max730x.c:34:
   In file included from include/linux/spi/max7301.h:5:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpio/gpio-max730x.c:34:
>> include/linux/spi/max7301.h:16:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip chip;
                            ^
   include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip'
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                        ^
   In file included from drivers/gpio/gpio-max730x.c:35:
   include/linux/gpio/driver.h:744:19: error: conflicting types for 'gpiod_to_chip'
   struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
                     ^
   include/asm-generic/gpio.h:58:9: note: previous implicit declaration is here
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   1 warning and 3 errors generated.
--
   In file included from drivers/mfd/ucb1400_core.c:23:
   In file included from include/linux/ucb1400.h:26:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/mfd/ucb1400_core.c:23:
>> include/linux/ucb1400.h:84:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip        gc;
                                   ^
   include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip'
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                        ^
   1 warning and 2 errors generated.
--
   In file included from drivers/leds/leds-pca955x.c:43:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/leds/leds-pca955x.c:115:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip gpio;
                            ^
   include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip'
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                        ^
>> drivers/leds/leds-pca955x.c:307:28: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                                     ^
>> drivers/leds/leds-pca955x.c:307:18: warning: incompatible integer to pointer conversion initializing 'struct pca955x *' with an expression of type 'int' [-Wint-conversion]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                           ^         ~~~~~~~~~~~~~~~~~~~~~
   drivers/leds/leds-pca955x.c:319:28: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                                     ^
   drivers/leds/leds-pca955x.c:319:18: warning: incompatible integer to pointer conversion initializing 'struct pca955x *' with an expression of type 'int' [-Wint-conversion]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                           ^         ~~~~~~~~~~~~~~~~~~~~~
   drivers/leds/leds-pca955x.c:336:28: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                                     ^
   drivers/leds/leds-pca955x.c:336:18: warning: incompatible integer to pointer conversion initializing 'struct pca955x *' with an expression of type 'int' [-Wint-conversion]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                           ^         ~~~~~~~~~~~~~~~~~~~~~
   drivers/leds/leds-pca955x.c:349:28: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                                     ^
   drivers/leds/leds-pca955x.c:349:18: warning: incompatible integer to pointer conversion initializing 'struct pca955x *' with an expression of type 'int' [-Wint-conversion]
           struct pca955x *pca955x = gpiochip_get_data(gc);
                           ^         ~~~~~~~~~~~~~~~~~~~~~
>> drivers/leds/leds-pca955x.c:554:9: error: implicit declaration of function 'devm_gpiochip_add_data' [-Werror,-Wimplicit-function-declaration]
                   err = devm_gpiochip_add_data(&client->dev, &pca955x->gpio,
                         ^
   5 warnings and 7 errors generated.
--
   In file included from drivers/bcma/main.c:8:
   In file included from drivers/bcma/bcma_private.h:9:
   In file included from include/linux/bcma/bcma.h:9:
   In file included from include/linux/bcma/bcma_driver_chipcommon.h:6:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
>> include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^
   include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'?
   include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                                   ^
>> include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion]
           return gpiod_to_chip(gpio_to_desc(gpio));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/bcma/main.c:8:
   In file included from drivers/bcma/bcma_private.h:9:
   In file included from include/linux/bcma/bcma.h:9:
>> include/linux/bcma/bcma_driver_chipcommon.h:647:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip gpio;
                            ^
   include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip'
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                        ^
   1 warning and 2 errors generated.

vim +/gpiod_to_chip +58 include/asm-generic/gpio.h

d2876d08d86f22 David Brownell    2008-02-04  54  
79a9becda8940d Alexandre Courbot 2013-10-17  55  /* caller holds gpio_lock *OR* gpio is marked as requested */
79a9becda8940d Alexandre Courbot 2013-10-17  56  static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
79a9becda8940d Alexandre Courbot 2013-10-17  57  {
79a9becda8940d Alexandre Courbot 2013-10-17 @58  	return gpiod_to_chip(gpio_to_desc(gpio));
79a9becda8940d Alexandre Courbot 2013-10-17  59  }
d2876d08d86f22 David Brownell    2008-02-04  60  

:::::: The code at line 58 was first introduced by commit
:::::: 79a9becda8940deb2274b5aa4577c86d52ee7ecb gpiolib: export descriptor-based GPIO interface

:::::: TO: Alexandre Courbot <acourbot@xxxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

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