* [dtor-input:next 9/36] drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'?
@ 2022-09-14 15:14 kernel test robot
2022-09-14 16:42 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-09-14 15:14 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: kbuild-all, linux-input, Dmitry Torokhov
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
head: d56111ed58482de0045e1e1201122e6e71516945
commit: f8f7f47d576f7f5d44ef9237f356bd6d42002614 [9/36] Input: matrix_keypad - replace of_gpio_named_count() by gpiod_count()
config: microblaze-randconfig-m041-20220914 (https://download.01.org/0day-ci/archive/20220914/202209142319.3cDIFi8V-lkp@intel.com/config)
compiler: microblaze-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/dtor/input.git/commit/?id=f8f7f47d576f7f5d44ef9237f356bd6d42002614
git remote add dtor-input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
git fetch --no-tags dtor-input next
git checkout f8f7f47d576f7f5d44ef9237f356bd6d42002614
# 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=microblaze SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/input/keyboard/matrix_keypad.c: In function 'matrix_keypad_parse_dt':
>> drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'? [-Werror=implicit-function-declaration]
419 | pdata->num_row_gpios = nrow = gpiod_count(dev, "row");
| ^~~~~~~~~~~
| of_gpio_count
cc1: some warnings being treated as errors
vim +419 drivers/input/keyboard/matrix_keypad.c
398
399 #ifdef CONFIG_OF
400 static struct matrix_keypad_platform_data *
401 matrix_keypad_parse_dt(struct device *dev)
402 {
403 struct matrix_keypad_platform_data *pdata;
404 struct device_node *np = dev->of_node;
405 unsigned int *gpios;
406 int ret, i, nrow, ncol;
407
408 if (!np) {
409 dev_err(dev, "device lacks DT data\n");
410 return ERR_PTR(-ENODEV);
411 }
412
413 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
414 if (!pdata) {
415 dev_err(dev, "could not allocate memory for platform data\n");
416 return ERR_PTR(-ENOMEM);
417 }
418
> 419 pdata->num_row_gpios = nrow = gpiod_count(dev, "row");
420 pdata->num_col_gpios = ncol = gpiod_count(dev, "col");
421 if (nrow < 0 || ncol < 0) {
422 dev_err(dev, "number of keypad rows/columns not specified\n");
423 return ERR_PTR(-EINVAL);
424 }
425
426 if (of_get_property(np, "linux,no-autorepeat", NULL))
427 pdata->no_autorepeat = true;
428
429 pdata->wakeup = of_property_read_bool(np, "wakeup-source") ||
430 of_property_read_bool(np, "linux,wakeup"); /* legacy */
431
432 if (of_get_property(np, "gpio-activelow", NULL))
433 pdata->active_low = true;
434
435 pdata->drive_inactive_cols =
436 of_property_read_bool(np, "drive-inactive-cols");
437
438 of_property_read_u32(np, "debounce-delay-ms", &pdata->debounce_ms);
439 of_property_read_u32(np, "col-scan-delay-us",
440 &pdata->col_scan_delay_us);
441
442 gpios = devm_kcalloc(dev,
443 pdata->num_row_gpios + pdata->num_col_gpios,
444 sizeof(unsigned int),
445 GFP_KERNEL);
446 if (!gpios) {
447 dev_err(dev, "could not allocate memory for gpios\n");
448 return ERR_PTR(-ENOMEM);
449 }
450
451 for (i = 0; i < nrow; i++) {
452 ret = of_get_named_gpio(np, "row-gpios", i);
453 if (ret < 0)
454 return ERR_PTR(ret);
455 gpios[i] = ret;
456 }
457
458 for (i = 0; i < ncol; i++) {
459 ret = of_get_named_gpio(np, "col-gpios", i);
460 if (ret < 0)
461 return ERR_PTR(ret);
462 gpios[nrow + i] = ret;
463 }
464
465 pdata->row_gpios = gpios;
466 pdata->col_gpios = &gpios[pdata->num_row_gpios];
467
468 return pdata;
469 }
470 #else
471 static inline struct matrix_keypad_platform_data *
472 matrix_keypad_parse_dt(struct device *dev)
473 {
474 dev_err(dev, "no platform data defined\n");
475
476 return ERR_PTR(-EINVAL);
477 }
478 #endif
479
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dtor-input:next 9/36] drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'?
2022-09-14 15:14 [dtor-input:next 9/36] drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'? kernel test robot
@ 2022-09-14 16:42 ` Andy Shevchenko
2022-09-14 18:17 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2022-09-14 16:42 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, linux-input, Dmitry Torokhov
On Wed, Sep 14, 2022 at 11:14:12PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
> head: d56111ed58482de0045e1e1201122e6e71516945
> commit: f8f7f47d576f7f5d44ef9237f356bd6d42002614 [9/36] Input: matrix_keypad - replace of_gpio_named_count() by gpiod_count()
> config: microblaze-randconfig-m041-20220914 (https://download.01.org/0day-ci/archive/20220914/202209142319.3cDIFi8V-lkp@intel.com/config)
> compiler: microblaze-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/dtor/input.git/commit/?id=f8f7f47d576f7f5d44ef9237f356bd6d42002614
> git remote add dtor-input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
> git fetch --no-tags dtor-input next
> git checkout f8f7f47d576f7f5d44ef9237f356bd6d42002614
> # 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=microblaze SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/input/keyboard/matrix_keypad.c: In function 'matrix_keypad_parse_dt':
> >> drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'? [-Werror=implicit-function-declaration]
> 419 | pdata->num_row_gpios = nrow = gpiod_count(dev, "row");
> | ^~~~~~~~~~~
> | of_gpio_count
> cc1: some warnings being treated as errors
Heh... Seems on some architectures this needs an explicit include of linux/gpio/consumer.h.
Dmitry, do you want me to send a fixup, or would you squash the change yourself?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dtor-input:next 9/36] drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'?
2022-09-14 16:42 ` Andy Shevchenko
@ 2022-09-14 18:17 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2022-09-14 18:17 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: kernel test robot, kbuild-all, linux-input
On Wed, Sep 14, 2022 at 07:42:02PM +0300, Andy Shevchenko wrote:
> On Wed, Sep 14, 2022 at 11:14:12PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
> > head: d56111ed58482de0045e1e1201122e6e71516945
> > commit: f8f7f47d576f7f5d44ef9237f356bd6d42002614 [9/36] Input: matrix_keypad - replace of_gpio_named_count() by gpiod_count()
> > config: microblaze-randconfig-m041-20220914 (https://download.01.org/0day-ci/archive/20220914/202209142319.3cDIFi8V-lkp@intel.com/config)
> > compiler: microblaze-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/dtor/input.git/commit/?id=f8f7f47d576f7f5d44ef9237f356bd6d42002614
> > git remote add dtor-input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
> > git fetch --no-tags dtor-input next
> > git checkout f8f7f47d576f7f5d44ef9237f356bd6d42002614
> > # 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=microblaze SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > drivers/input/keyboard/matrix_keypad.c: In function 'matrix_keypad_parse_dt':
> > >> drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'? [-Werror=implicit-function-declaration]
> > 419 | pdata->num_row_gpios = nrow = gpiod_count(dev, "row");
> > | ^~~~~~~~~~~
> > | of_gpio_count
> > cc1: some warnings being treated as errors
>
> Heh... Seems on some architectures this needs an explicit include of linux/gpio/consumer.h.
> Dmitry, do you want me to send a fixup, or would you squash the change yourself?
The patch is too deep in the tree to squash, so please just send a
fixup.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dtor-input:next 9/36] drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'?
@ 2022-09-14 18:17 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2022-09-14 18:17 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2350 bytes --]
On Wed, Sep 14, 2022 at 07:42:02PM +0300, Andy Shevchenko wrote:
> On Wed, Sep 14, 2022 at 11:14:12PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
> > head: d56111ed58482de0045e1e1201122e6e71516945
> > commit: f8f7f47d576f7f5d44ef9237f356bd6d42002614 [9/36] Input: matrix_keypad - replace of_gpio_named_count() by gpiod_count()
> > config: microblaze-randconfig-m041-20220914 (https://download.01.org/0day-ci/archive/20220914/202209142319.3cDIFi8V-lkp(a)intel.com/config)
> > compiler: microblaze-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/dtor/input.git/commit/?id=f8f7f47d576f7f5d44ef9237f356bd6d42002614
> > git remote add dtor-input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
> > git fetch --no-tags dtor-input next
> > git checkout f8f7f47d576f7f5d44ef9237f356bd6d42002614
> > # 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=microblaze SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > drivers/input/keyboard/matrix_keypad.c: In function 'matrix_keypad_parse_dt':
> > >> drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'? [-Werror=implicit-function-declaration]
> > 419 | pdata->num_row_gpios = nrow = gpiod_count(dev, "row");
> > | ^~~~~~~~~~~
> > | of_gpio_count
> > cc1: some warnings being treated as errors
>
> Heh... Seems on some architectures this needs an explicit include of linux/gpio/consumer.h.
> Dmitry, do you want me to send a fixup, or would you squash the change yourself?
The patch is too deep in the tree to squash, so please just send a
fixup.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-14 18:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 15:14 [dtor-input:next 9/36] drivers/input/keyboard/matrix_keypad.c:419:39: error: implicit declaration of function 'gpiod_count'; did you mean 'of_gpio_count'? kernel test robot
2022-09-14 16:42 ` Andy Shevchenko
2022-09-14 18:17 ` Dmitry Torokhov
2022-09-14 18:17 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.