From: kernel test robot <lkp@intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH RFT/RFC 1/2] gpiolib: support "undefined" GPIO machine lookup
Date: Thu, 20 Nov 2025 03:30:43 +0800 [thread overview]
Message-ID: <202511200320.9ITKS8Am-lkp@intel.com> (raw)
In-Reply-To: <20251119-cs42l43-gpio-lookup-v1-1-029b1d9e1843@linaro.org>
Hi Bartosz,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on fe4d0dea039f2befb93f27569593ec209843b0f5]
url: https://github.com/intel-lab-lkp/linux/commits/Bartosz-Golaszewski/gpiolib-support-undefined-GPIO-machine-lookup/20251119-233054
base: fe4d0dea039f2befb93f27569593ec209843b0f5
patch link: https://lore.kernel.org/r/20251119-cs42l43-gpio-lookup-v1-1-029b1d9e1843%40linaro.org
patch subject: [PATCH RFT/RFC 1/2] gpiolib: support "undefined" GPIO machine lookup
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251120/202511200320.9ITKS8Am-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 0bba1e76581bad04e7d7f09f5115ae5e2989e0d9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251120/202511200320.9ITKS8Am-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/202511200320.9ITKS8Am-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/gpio/gpiolib.c:4560:25: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
4560 | if (p->key == PTR_ERR(-ENOENT))
| ^~~~~~~
include/linux/err.h:63:61: note: passing argument to parameter 'ptr' here
63 | static inline long __must_check PTR_ERR(__force const void *ptr)
| ^
>> drivers/gpio/gpiolib.c:4560:14: warning: comparison between pointer and integer ('const char *' and 'long') [-Wpointer-integer-compare]
4560 | if (p->key == PTR_ERR(-ENOENT))
| ~~~~~~ ^ ~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +4560 drivers/gpio/gpiolib.c
4536
4537 static struct gpio_desc *gpiod_find(struct device *dev, const char *con_id,
4538 unsigned int idx, unsigned long *flags)
4539 {
4540 struct gpio_desc *desc = ERR_PTR(-ENOENT);
4541 struct gpiod_lookup_table *table;
4542 struct gpiod_lookup *p;
4543 struct gpio_chip *gc;
4544
4545 guard(mutex)(&gpio_lookup_lock);
4546
4547 table = gpiod_find_lookup_table(dev);
4548 if (!table)
4549 return desc;
4550
4551 for (p = &table->table[0]; p->key; p++) {
4552 /* idx must always match exactly */
4553 if (p->idx != idx)
4554 continue;
4555
4556 /* If the lookup entry has a con_id, require exact match */
4557 if (p->con_id && (!con_id || strcmp(p->con_id, con_id)))
4558 continue;
4559
> 4560 if (p->key == PTR_ERR(-ENOENT))
4561 return ERR_PTR(-ENOENT);
4562
4563 if (p->chip_hwnum == U16_MAX) {
4564 desc = gpio_name_to_desc(p->key);
4565 if (desc) {
4566 *flags = p->flags;
4567 return desc;
4568 }
4569
4570 dev_warn(dev, "cannot find GPIO line %s, deferring\n",
4571 p->key);
4572 return ERR_PTR(-EPROBE_DEFER);
4573 }
4574
4575 struct gpio_device *gdev __free(gpio_device_put) =
4576 gpio_device_find_by_label(p->key);
4577 if (!gdev) {
4578 /*
4579 * As the lookup table indicates a chip with
4580 * p->key should exist, assume it may
4581 * still appear later and let the interested
4582 * consumer be probed again or let the Deferred
4583 * Probe infrastructure handle the error.
4584 */
4585 dev_warn(dev, "cannot find GPIO chip %s, deferring\n",
4586 p->key);
4587 return ERR_PTR(-EPROBE_DEFER);
4588 }
4589
4590 gc = gpio_device_get_chip(gdev);
4591
4592 if (gc->ngpio <= p->chip_hwnum) {
4593 dev_err(dev,
4594 "requested GPIO %u (%u) is out of range [0..%u] for chip %s\n",
4595 idx, p->chip_hwnum, gc->ngpio - 1,
4596 gc->label);
4597 return ERR_PTR(-EINVAL);
4598 }
4599
4600 desc = gpio_device_get_desc(gdev, p->chip_hwnum);
4601 *flags = p->flags;
4602
4603 return desc;
4604 }
4605
4606 return desc;
4607 }
4608
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-19 19:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 15:21 [PATCH RFT/RFC 0/2] mfd: cs42l43: fix GPIO lookup for chip selects Bartosz Golaszewski
2025-11-19 15:21 ` [PATCH RFT/RFC 1/2] gpiolib: support "undefined" GPIO machine lookup Bartosz Golaszewski
2025-11-19 16:43 ` kernel test robot
2025-11-19 16:49 ` Bartosz Golaszewski
2025-11-19 19:30 ` kernel test robot [this message]
2025-11-19 15:21 ` [PATCH RFT/RFC 2/2] mfd: cs42l43: use GPIO machine lookup for cs-gpios Bartosz Golaszewski
2025-11-19 15:35 ` Bartosz Golaszewski
2025-11-19 15:52 ` Charles Keepax
2025-11-19 16:13 ` Charles Keepax
2025-11-19 16:28 ` Bartosz Golaszewski
2025-11-19 16:43 ` Charles Keepax
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=202511200320.9ITKS8Am-lkp@intel.com \
--to=lkp@intel.com \
--cc=brgl@bgdev.pl \
--cc=llvm@lists.linux.dev \
--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 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.