Subject: Re: [PATCH v6 3/4] gpiolib: Pass array info to get/set array functions

From: kbuild test robot <[email-masked]>
Date: Tue, 4 Sep 2018 23:27:42 +0800

Hi Janusz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on gpio/for-next]
[also build test ERROR on v4.19-rc2 next-20180831]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Janusz-Krzysztofik/gpiolib-speed-up-GPIO-array-processing/20180903-174241
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: arm-cns3420vb_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago

All errors (new ones prefixed by >>):

   drivers/mmc/core/pwrseq_simple.c: In function 'mmc_pwrseq_simple_set_gpios_value':
   drivers/mmc/core/pwrseq_simple.c:49:13: error: passing argument 3 of 'gpiod_set_array_value_cansleep' from incompatible pointer type [-Werror=incompatible-pointer-types]
                reset_gpios->info, value_bitmap);
                ^~~~~~~~~~~
   In file included from drivers/mmc/core/pwrseq_simple.c:18:0:
   include/linux/gpio/consumer.h:417:20: note: expected 'int *' but argument is of type 'struct gpio_array *'
    static inline void gpiod_set_array_value_cansleep(unsigned int array_size,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/core/pwrseq_simple.c:48:3: error: too many arguments to function 'gpiod_set_array_value_cansleep'
      gpiod_set_array_value_cansleep(nvalues, reset_gpios->desc,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/mmc/core/pwrseq_simple.c:18:0:
   include/linux/gpio/consumer.h:417:20: note: declared here
    static inline void gpiod_set_array_value_cansleep(unsigned int array_size,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/2313edb413de154774fb6a3431f5f135f9c78180
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 2313edb413de154774fb6a3431f5f135f9c78180
vim +/gpiod_set_array_value_cansleep +48 drivers/mmc/core/pwrseq_simple.c

5b96fea73 Srinivas Kandagatla      2016-04-14  36  
934f1f483 Javier Martinez Canillas 2015-01-29  37  static void mmc_pwrseq_simple_set_gpios_value(struct mmc_pwrseq_simple *pwrseq,
934f1f483 Javier Martinez Canillas 2015-01-29  38  					      int value)
934f1f483 Javier Martinez Canillas 2015-01-29  39  {
ce0372758 Javier Martinez Canillas 2015-09-21  40  	struct gpio_descs *reset_gpios = pwrseq->reset_gpios;
64a67d476 Martin Fuzzey            2016-01-20  41  
64a67d476 Martin Fuzzey            2016-01-20  42  	if (!IS_ERR(reset_gpios)) {
486e66613 Tobin C. Harding         2018-03-26  43  		int nvalues = reset_gpios->ndescs;
00db98568 Janusz Krzysztofik       2018-09-01  44  		DECLARE_BITMAP(value_bitmap, nvalues);
934f1f483 Javier Martinez Canillas 2015-01-29  45  
00db98568 Janusz Krzysztofik       2018-09-01  46  		*value_bitmap = value;
486e66613 Tobin C. Harding         2018-03-26  47  
00db98568 Janusz Krzysztofik       2018-09-01 @48  		gpiod_set_array_value_cansleep(nvalues, reset_gpios->desc,
2313edb41 Janusz Krzysztofik       2018-09-01 @49  					       reset_gpios->info, value_bitmap);
64a67d476 Martin Fuzzey            2016-01-20  50  	}
934f1f483 Javier Martinez Canillas 2015-01-29  51  }
934f1f483 Javier Martinez Canillas 2015-01-29  52  

:::::: The code at line 48 was first introduced by commit
:::::: 00db98568b73a7b04c5120e5b87934c7355cc015 gpiolib: Pass bitmaps, not integer arrays, to get/set array

:::::: TO: Janusz Krzysztofik <[email-masked]>
:::::: CC: 0day robot <[email-masked]>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation