public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [brgl:gpio/for-next 57/59] drivers/gpio/gpio-tegra186.c:502:18: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
@ 2026-03-27 17:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-27 17:45 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: oe-kbuild-all, linux-gpio

Hi Bartosz,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
head:   af475c16bc02a08ed6af6ca0c920f98a45611fe6
commit: 7803501e5754dc4b295ab22b20562e2b965358ba [57/59] gpio: drop unneeded Kconfig dependencies on OF_GPIO
config: sh-randconfig-r112-20260326 (https://download.01.org/0day-ci/archive/20260328/202603280145.tWkm6Erp-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 9.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260328/202603280145.tWkm6Erp-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603280145.tWkm6Erp-lkp@intel.com/

Note: the brgl/gpio/for-next HEAD af475c16bc02a08ed6af6ca0c920f98a45611fe6 builds fine.
      It only hurts bisectability.

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/sh/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/irq.h:14,
                    from include/linux/irqchip/chained_irq.h:10,
                    from include/linux/gpio/driver.h:8,
                    from drivers/gpio/gpio-tegra186.c:9:
   drivers/gpio/gpio-tegra186.c: In function 'tegra186_gpio_of_xlate':
>> drivers/gpio/gpio-tegra186.c:502:18: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     502 |  if (WARN_ON(chip->of_gpio_n_cells < 2))
         |                  ^~
   arch/sh/include/asm/bug.h:69:25: note: in definition of macro 'WARN_ON'
      69 |  int __ret_warn_on = !!(x);    \
         |                         ^
   drivers/gpio/gpio-tegra186.c:505:37: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     505 |  if (WARN_ON(spec->args_count < chip->of_gpio_n_cells))
         |                                     ^~
   arch/sh/include/asm/bug.h:69:25: note: in definition of macro 'WARN_ON'
      69 |  int __ret_warn_on = !!(x);    \
         |                         ^
   drivers/gpio/gpio-tegra186.c: In function 'tegra186_gpio_irq_domain_translate':
   drivers/gpio/gpio-tegra186.c:709:24: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     709 |  if (WARN_ON(gpio->gpio.of_gpio_n_cells < 2))
         |                        ^
   arch/sh/include/asm/bug.h:69:25: note: in definition of macro 'WARN_ON'
      69 |  int __ret_warn_on = !!(x);    \
         |                         ^
   drivers/gpio/gpio-tegra186.c:712:46: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     712 |  if (WARN_ON(fwspec->param_count < gpio->gpio.of_gpio_n_cells))
         |                                              ^
   arch/sh/include/asm/bug.h:69:25: note: in definition of macro 'WARN_ON'
      69 |  int __ret_warn_on = !!(x);    \
         |                         ^
   At top level:
>> drivers/gpio/gpio-tegra186.c:495:12: warning: 'tegra186_gpio_of_xlate' defined but not used [-Wunused-function]
     495 | static int tegra186_gpio_of_xlate(struct gpio_chip *chip,
         |            ^~~~~~~~~~~~~~~~~~~~~~
--
   drivers/gpio/gpio-brcmstb.c: In function 'brcmstb_gpio_of_xlate':
>> drivers/gpio/gpio-brcmstb.c:435:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     435 |  if (gc->of_gpio_n_cells != 2) {
         |        ^~
   In file included from include/linux/bug.h:5,
                    from include/linux/instrumented.h:10,
                    from include/linux/atomic/atomic-instrumented.h:17,
                    from include/linux/atomic.h:82,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/sh/include/asm/bitops.h:63,
                    from include/linux/bitops.h:67,
                    from drivers/gpio/gpio-brcmstb.c:4:
   drivers/gpio/gpio-brcmstb.c:440:39: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     440 |  if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells))
         |                                       ^~
   arch/sh/include/asm/bug.h:69:25: note: in definition of macro 'WARN_ON'
      69 |  int __ret_warn_on = !!(x);    \
         |                         ^
   drivers/gpio/gpio-brcmstb.c: In function 'brcmstb_gpio_probe':
   drivers/gpio/gpio-brcmstb.c:736:5: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
     736 |   gc->of_gpio_n_cells = 2;
         |     ^~
>> drivers/gpio/gpio-brcmstb.c:737:5: error: 'struct gpio_chip' has no member named 'of_xlate'
     737 |   gc->of_xlate = brcmstb_gpio_of_xlate;
         |     ^~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GPIO_SYSCON
   Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
   Selected by [y]:
   - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && (ARCH_AT91 || COMPILE_TEST [=y])


vim +502 drivers/gpio/gpio-tegra186.c

b64d6c9a6a050d Thierry Reding 2020-03-19  494  
5b2b135a87fcfb Thierry Reding 2017-11-07 @495  static int tegra186_gpio_of_xlate(struct gpio_chip *chip,
5b2b135a87fcfb Thierry Reding 2017-11-07  496  				  const struct of_phandle_args *spec,
5b2b135a87fcfb Thierry Reding 2017-11-07  497  				  u32 *flags)
5b2b135a87fcfb Thierry Reding 2017-11-07  498  {
5b2b135a87fcfb Thierry Reding 2017-11-07  499  	struct tegra_gpio *gpio = gpiochip_get_data(chip);
5b2b135a87fcfb Thierry Reding 2017-11-07  500  	unsigned int port, pin, i, offset = 0;
5b2b135a87fcfb Thierry Reding 2017-11-07  501  
5b2b135a87fcfb Thierry Reding 2017-11-07 @502  	if (WARN_ON(chip->of_gpio_n_cells < 2))
5b2b135a87fcfb Thierry Reding 2017-11-07  503  		return -EINVAL;
5b2b135a87fcfb Thierry Reding 2017-11-07  504  
5b2b135a87fcfb Thierry Reding 2017-11-07  505  	if (WARN_ON(spec->args_count < chip->of_gpio_n_cells))
5b2b135a87fcfb Thierry Reding 2017-11-07  506  		return -EINVAL;
5b2b135a87fcfb Thierry Reding 2017-11-07  507  
5b2b135a87fcfb Thierry Reding 2017-11-07  508  	port = spec->args[0] / 8;
5b2b135a87fcfb Thierry Reding 2017-11-07  509  	pin = spec->args[0] % 8;
5b2b135a87fcfb Thierry Reding 2017-11-07  510  
5b2b135a87fcfb Thierry Reding 2017-11-07  511  	if (port >= gpio->soc->num_ports) {
5b2b135a87fcfb Thierry Reding 2017-11-07  512  		dev_err(chip->parent, "invalid port number: %u\n", port);
5b2b135a87fcfb Thierry Reding 2017-11-07  513  		return -EINVAL;
5b2b135a87fcfb Thierry Reding 2017-11-07  514  	}
5b2b135a87fcfb Thierry Reding 2017-11-07  515  
5b2b135a87fcfb Thierry Reding 2017-11-07  516  	for (i = 0; i < port; i++)
5b2b135a87fcfb Thierry Reding 2017-11-07  517  		offset += gpio->soc->ports[i].pins;
5b2b135a87fcfb Thierry Reding 2017-11-07  518  
5b2b135a87fcfb Thierry Reding 2017-11-07  519  	if (flags)
5b2b135a87fcfb Thierry Reding 2017-11-07  520  		*flags = spec->args[1];
5b2b135a87fcfb Thierry Reding 2017-11-07  521  
5b2b135a87fcfb Thierry Reding 2017-11-07  522  	return offset + pin;
5b2b135a87fcfb Thierry Reding 2017-11-07  523  }
5b2b135a87fcfb Thierry Reding 2017-11-07  524  

:::::: The code at line 502 was first introduced by commit
:::::: 5b2b135a87fcfb2b27c3c192fd7c3b053f0c5fa2 gpio: Add Tegra186 support

:::::: TO: Thierry Reding <treding@nvidia.com>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>

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

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

only message in thread, other threads:[~2026-03-27 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-27 17:45 [brgl:gpio/for-next 57/59] drivers/gpio/gpio-tegra186.c:502:18: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells' 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