From: kernel test robot <lkp@intel.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-gpio@vger.kernel.org
Subject: [brgl:gpio/for-next 57/59] drivers/gpio/gpio-mt7621.c:254:14: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
Date: Sat, 28 Mar 2026 01:24:29 +0800 [thread overview]
Message-ID: <202603280113.OtboXgzp-lkp@intel.com> (raw)
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: um-randconfig-r112-20260326 (https://download.01.org/0day-ci/archive/20260328/202603280113.OtboXgzp-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260328/202603280113.OtboXgzp-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/202603280113.OtboXgzp-lkp@intel.com/
Note: the brgl/gpio/for-next HEAD af475c16bc02a08ed6af6ca0c920f98a45611fe6 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from drivers/gpio/gpio-mt7621.c:8:
In file included from include/linux/gpio/driver.h:8:
In file included from include/linux/irqchip/chained_irq.h:10:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:12:
In file included from arch/um/include/asm/io.h:24:
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
| ~~~~~~~~~~ ^
>> drivers/gpio/gpio-mt7621.c:254:14: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
254 | rg->chip.gc.of_gpio_n_cells = 2;
| ~~~~~~~~~~~ ^
>> drivers/gpio/gpio-mt7621.c:255:14: error: no member named 'of_xlate' in 'struct gpio_chip'
255 | rg->chip.gc.of_xlate = mediatek_gpio_xlate;
| ~~~~~~~~~~~ ^
1 warning and 2 errors generated.
--
In file included from drivers/gpio/gpio-tegra186.c:9:
In file included from include/linux/gpio/driver.h:8:
In file included from include/linux/irqchip/chained_irq.h:10:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:12:
In file included from arch/um/include/asm/io.h:24:
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
| ~~~~~~~~~~ ^
>> drivers/gpio/gpio-tegra186.c:502:20: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
502 | if (WARN_ON(chip->of_gpio_n_cells < 2))
| ~~~~ ^
drivers/gpio/gpio-tegra186.c:505:39: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
505 | if (WARN_ON(spec->args_count < chip->of_gpio_n_cells))
| ~~~~ ^
drivers/gpio/gpio-tegra186.c:709:25: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
709 | if (WARN_ON(gpio->gpio.of_gpio_n_cells < 2))
| ~~~~~~~~~~ ^
include/asm-generic/bug.h:155:25: note: expanded from macro 'WARN_ON'
155 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
drivers/gpio/gpio-tegra186.c:712:47: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
712 | if (WARN_ON(fwspec->param_count < gpio->gpio.of_gpio_n_cells))
| ~~~~~~~~~~ ^
include/asm-generic/bug.h:155:25: note: expanded from macro 'WARN_ON'
155 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
1 warning and 4 errors generated.
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 +254 drivers/gpio/gpio-mt7621.c
09eed5a1ed3c75 Sergio Paracuellos 2022-09-13 218
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 219 static int
9804456e60670c Andy Shevchenko 2021-12-20 220 mediatek_gpio_bank_probe(struct device *dev, int bank)
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 221 {
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 222 struct gpio_generic_chip_config config;
8512486ba2d441 Linus Walleij 2018-07-09 223 struct mtk *mtk = dev_get_drvdata(dev);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 224 struct mtk_gc *rg;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 225 void __iomem *dat, *set, *ctrl, *diro;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 226 int ret;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 227
8512486ba2d441 Linus Walleij 2018-07-09 228 rg = &mtk->gc_map[bank];
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 229 memset(rg, 0, sizeof(*rg));
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 230
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 231 rg->bank = bank;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 232
8512486ba2d441 Linus Walleij 2018-07-09 233 dat = mtk->base + GPIO_REG_DATA + (rg->bank * GPIO_BANK_STRIDE);
8512486ba2d441 Linus Walleij 2018-07-09 234 set = mtk->base + GPIO_REG_DSET + (rg->bank * GPIO_BANK_STRIDE);
8512486ba2d441 Linus Walleij 2018-07-09 235 ctrl = mtk->base + GPIO_REG_DCLR + (rg->bank * GPIO_BANK_STRIDE);
8512486ba2d441 Linus Walleij 2018-07-09 236 diro = mtk->base + GPIO_REG_CTRL + (rg->bank * GPIO_BANK_STRIDE);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 237
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 238 config = (struct gpio_generic_chip_config) {
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 239 .dev = dev,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 240 .sz = 4,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 241 .dat = dat,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 242 .set = set,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 243 .clr = ctrl,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 244 .dirout = diro,
64f89f6e1f2b7f Bartosz Golaszewski 2025-09-17 245 .flags = GPIO_GENERIC_NO_SET_ON_INPUT,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 246 };
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 247
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 248 ret = gpio_generic_chip_init(&rg->chip, &config);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 249 if (ret) {
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 250 dev_err(dev, "failed to initialize generic GPIO chip\n");
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 251 return ret;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 252 }
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 253
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 @254 rg->chip.gc.of_gpio_n_cells = 2;
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 @255 rg->chip.gc.of_xlate = mediatek_gpio_xlate;
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 256 rg->chip.gc.label = devm_kasprintf(dev, GFP_KERNEL, "%s-bank%d",
8512486ba2d441 Linus Walleij 2018-07-09 257 dev_name(dev), bank);
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 258 if (!rg->chip.gc.label)
59d646c775d6ae Nicholas Mc Guire 2018-11-21 259 return -ENOMEM;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 260
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 261 rg->chip.gc.offset = bank * MTK_BANK_WIDTH;
fa84667b98fd1a René van Dorst 2019-01-30 262
8512486ba2d441 Linus Walleij 2018-07-09 263 if (mtk->gpio_irq) {
f4e9bcc05f4e8d Linus Walleij 2019-08-09 264 struct gpio_irq_chip *girq;
f4e9bcc05f4e8d Linus Walleij 2019-08-09 265
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 266 /*
f4e9bcc05f4e8d Linus Walleij 2019-08-09 267 * Directly request the irq here instead of passing
72780ce5f1a418 Linus Walleij 2020-01-13 268 * a flow-handler because the irq is shared.
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 269 */
8512486ba2d441 Linus Walleij 2018-07-09 270 ret = devm_request_irq(dev, mtk->gpio_irq,
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 271 mediatek_gpio_irq_handler, IRQF_SHARED,
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 272 rg->chip.gc.label, &rg->chip.gc);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 273
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 274 if (ret) {
8512486ba2d441 Linus Walleij 2018-07-09 275 dev_err(dev, "Error requesting IRQ %d: %d\n",
8512486ba2d441 Linus Walleij 2018-07-09 276 mtk->gpio_irq, ret);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 277 return ret;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 278 }
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 279
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 280 girq = &rg->chip.gc.irq;
09eed5a1ed3c75 Sergio Paracuellos 2022-09-13 281 gpio_irq_chip_set_chip(girq, &mt7621_irq_chip);
f4e9bcc05f4e8d Linus Walleij 2019-08-09 282 /* This will let us handle the parent IRQ in the driver */
f4e9bcc05f4e8d Linus Walleij 2019-08-09 283 girq->parent_handler = NULL;
f4e9bcc05f4e8d Linus Walleij 2019-08-09 284 girq->num_parents = 0;
f4e9bcc05f4e8d Linus Walleij 2019-08-09 285 girq->parents = NULL;
f4e9bcc05f4e8d Linus Walleij 2019-08-09 286 girq->default_type = IRQ_TYPE_NONE;
f4e9bcc05f4e8d Linus Walleij 2019-08-09 287 girq->handler = handle_simple_irq;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 288 }
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 289
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 290 ret = devm_gpiochip_add_data(dev, &rg->chip.gc, mtk);
f4e9bcc05f4e8d Linus Walleij 2019-08-09 291 if (ret < 0) {
f4e9bcc05f4e8d Linus Walleij 2019-08-09 292 dev_err(dev, "Could not register gpio %d, ret=%d\n",
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 293 rg->chip.gc.ngpio, ret);
f4e9bcc05f4e8d Linus Walleij 2019-08-09 294 return ret;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 295 }
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 296
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 297 /* set polarity to low for all gpios */
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 298 mtk_gpio_w32(rg, GPIO_REG_POL, 0);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 299
80fd7e96d669d7 Bartosz Golaszewski 2025-09-10 300 dev_info(dev, "registering %d gpios\n", rg->chip.gc.ngpio);
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 301
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 302 return 0;
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 303 }
4ba9c3afda4121 Sergio Paracuellos 2018-07-05 304
:::::: The code at line 254 was first introduced by commit
:::::: 80fd7e96d669d729d9e01bfa3e2b60ea6b500e20 gpio: mt7621: use new generic GPIO chip API
:::::: TO: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
:::::: CC: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-03-27 17:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603280113.OtboXgzp-lkp@intel.com \
--to=lkp@intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=linux-gpio@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox