Re: [PATCH v3 4/4] pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver

From: kernel test robot
Date: Sun Jan 28 2024 - 20:46:10 EST


Hi Jacky,

kernel test robot noticed the following build errors:

[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next robh/for-next linus/master v6.8-rc1 next-20240125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Jacky-Huang/dt-bindings-reset-Add-syscon-to-nuvoton-ma35d1-system-management-node/20240123-161939
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link: https://lore.kernel.org/r/20240123080637.1902578-5-ychuang570808%40gmail.com
patch subject: [PATCH v3 4/4] pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver
config: x86_64-randconfig-121-20240128 (https://download.01.org/0day-ci/archive/20240129/202401290933.pxXzpfAD-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240129/202401290933.pxXzpfAD-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401290933.pxXzpfAD-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/pinctrl/nuvoton/pinctrl-ma35.c: In function 'ma35_gpiolib_register':
>> drivers/pinctrl/nuvoton/pinctrl-ma35.c:523:27: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
523 | bank->chip.of_gpio_n_cells = 2;
| ^
drivers/pinctrl/nuvoton/pinctrl-ma35.c: At top level:
>> drivers/pinctrl/nuvoton/pinctrl-ma35.c:1008:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
1008 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/nuvoton/pinctrl-ma35.c:1008:23: warning: initialization of 'int (*)(struct pinctrl_dev *, unsigned int, long unsigned int *)' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1008 | .is_generic = true,
| ^~~~
drivers/pinctrl/nuvoton/pinctrl-ma35.c:1008:23: note: (near initialization for 'ma35_pinconf_ops.pin_config_group_get')
drivers/pinctrl/nuvoton/pinctrl-ma35.c: In function 'ma35_pinctrl_parse_groups':
>> drivers/pinctrl/nuvoton/pinctrl-ma35.c:1024:15: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
1024 | ret = pinconf_generic_parse_dt_config(np, NULL, &configs, &nconfigs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pinconf_generic_dump_config
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PINCTRL_MA35
Depends on [n]: PINCTRL [=y] && (ARCH_MA35 || COMPILE_TEST [=n]) && OF [=n]
Selected by [y]:
- PINCTRL_MA35D1 [=y] && PINCTRL [=y]


vim +523 drivers/pinctrl/nuvoton/pinctrl-ma35.c

506
507 static int ma35_gpiolib_register(struct platform_device *pdev, struct ma35_pinctrl *npctl)
508 {
509 struct ma35_pin_ctrl *ctrl = npctl->ctrl;
510 struct ma35_pin_bank *bank = ctrl->pin_banks;
511 int ret;
512 int i;
513
514 for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
515 if (!bank->valid) {
516 dev_warn(&pdev->dev, "bank %s is not valid\n",
517 bank->np->name);
518 continue;
519 }
520 bank->irqtype = 0;
521 bank->irqinten = 0;
522 bank->chip.label = bank->name;
> 523 bank->chip.of_gpio_n_cells = 2;
524 bank->chip.parent = &pdev->dev;
525 bank->chip.request = ma35_gpio_core_to_request;
526 bank->chip.direction_input = ma35_gpio_core_direction_in;
527 bank->chip.direction_output = ma35_gpio_core_direction_out;
528 bank->chip.get = ma35_gpio_core_get;
529 bank->chip.set = ma35_gpio_core_set;
530 bank->chip.base = -1;
531 bank->chip.ngpio = bank->nr_pins;
532 bank->chip.can_sleep = false;
533 spin_lock_init(&bank->lock);
534
535 if (bank->irq > 0) {
536 struct gpio_irq_chip *girq;
537
538 girq = &bank->chip.irq;
539 gpio_irq_chip_set_chip(girq, &ma35_gpio_irqchip);
540 girq->parent_handler = ma35_irq_demux_intgroup;
541 girq->num_parents = 1;
542
543 girq->parents = devm_kcalloc(&pdev->dev, 1, sizeof(*girq->parents),
544 GFP_KERNEL);
545 if (!girq->parents)
546 return -ENOMEM;
547
548 girq->parents[0] = bank->irq;
549 girq->default_type = IRQ_TYPE_NONE;
550 girq->handler = handle_level_irq;
551 }
552
553 ret = gpiochip_add_data(&bank->chip, bank);
554 if (ret) {
555 dev_err(&pdev->dev, "failed to register gpio_chip %s, error code: %d\n",
556 bank->chip.label, ret);
557 goto fail;
558 }
559 }
560 return 0;
561
562 fail:
563 for (--i, --bank; i >= 0; --i, --bank) {
564 if (!bank->valid)
565 continue;
566 gpiochip_remove(&bank->chip);
567 }
568 return ret;
569 }
570

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