oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [linusw-gpio:gpiochip-no-driver-h 5/5] arch/mips/ar7/gpio.c:24:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
@ 2023-02-12 21:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-12 21:47 UTC (permalink / raw)
  To: Linus Walleij; +Cc: oe-kbuild-all, linux-gpio

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpiochip-no-driver-h
head:   df771cce328bbd37333797d0df3471c2e03ecb03
commit: df771cce328bbd37333797d0df3471c2e03ecb03 [5/5] gpio: Make the legacy <linux/gpio.h> consumer-only
config: mips-ar7_defconfig (https://download.01.org/0day-ci/archive/20230213/202302130551.RReykD8t-lkp@intel.com/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/linusw/linux-gpio.git/commit/?id=df771cce328bbd37333797d0df3471c2e03ecb03
        git remote add linusw-gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
        git fetch --no-tags linusw-gpio gpiochip-no-driver-h
        git checkout df771cce328bbd37333797d0df3471c2e03ecb03
        # 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@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302130551.RReykD8t-lkp@intel.com/

All warnings (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 +24 arch/mips/ar7/gpio.c

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 24 was first introduced by commit
:::::: 1b2766fb496c462b3f6e1d1c52c72f8601ac8540 MIPS: ar7: use gpiochip data pointer

:::::: TO: Linus Walleij <linus.walleij@linaro.org>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-12 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 21:47 [linusw-gpio:gpiochip-no-driver-h 5/5] arch/mips/ar7/gpio.c:24:38: warning: initialization of 'struct ar7_gpio_chip *' from 'int' makes pointer from integer without a cast kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).