[gpio:gpiochip-no-driver-h 2/2] include/linux/gpio/driver.h:704:19: error: conflicting types for 'gpiod_to_chip'; have 'struct gpio_chip *(const struct gpio_desc *)'

[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:   3357a6b5d4c178fcbe95eb72c4e653b3a5b41569
commit: 3357a6b5d4c178fcbe95eb72c4e653b3a5b41569 [2/2] See what explodes if we apply this patch
config: mips-capcella_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.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/linusw/linux-gpio.git/commit/?id=3357a6b5d4c178fcbe95eb72c4e653b3a5b41569
        git remote add gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
        git fetch --no-tags gpio gpiochip-no-driver-h
        git checkout 3357a6b5d4c178fcbe95eb72c4e653b3a5b41569
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/gpio.h:62,
                    from drivers/gpio/gpiolib.c:14:
   include/asm-generic/gpio.h: In function 'gpio_to_chip':
   include/asm-generic/gpio.h:58:16: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration]
      58 |         return gpiod_to_chip(gpio_to_desc(gpio));
         |                ^~~~~~~~~~~~~
         |                gpio_to_chip
   include/asm-generic/gpio.h:58:16: warning: returning 'int' from a function with return type 'struct gpio_chip *' makes pointer from integer without a cast [-Wint-conversion]
      58 |         return gpiod_to_chip(gpio_to_desc(gpio));
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpio/gpiolib.c:18:
   include/linux/gpio/driver.h: At top level:
>> include/linux/gpio/driver.h:704:19: error: conflicting types for 'gpiod_to_chip'; have 'struct gpio_chip *(const struct gpio_desc *)'
     704 | struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
         |                   ^~~~~~~~~~~~~
   In file included from include/linux/gpio.h:62,
                    from drivers/gpio/gpiolib.c:14:
   include/asm-generic/gpio.h:58:16: note: previous implicit declaration of 'gpiod_to_chip' with type 'int()'
      58 |         return gpiod_to_chip(gpio_to_desc(gpio));
         |                ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +704 include/linux/gpio/driver.h

c7663fa2a6631e YueHaibing      2019-08-22  702  
9091373ab7ea27 Masahiro Yamada 2019-07-30  703  
9091373ab7ea27 Masahiro Yamada 2019-07-30 @704  struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
9091373ab7ea27 Masahiro Yamada 2019-07-30  705  

:::::: The code at line 704 was first introduced by commit
:::::: 9091373ab7ea27cad381ce71aa37de6b9e687e81 gpio: remove less important #ifdef around declarations

:::::: TO: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
:::::: CC: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>

---
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