From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linus Walleij <linusw@kernel.org>,
Jacky Huang <ychuang3@nuvoton.com>,
Shan-Chun Hung <schung@nuvoton.com>
Subject: Re: [PATCH v1 4/4] pinctrl: pistachio: Replace open coded fwnode_is_gpiochip()
Date: Sun, 30 Aug 2026 21:31:37 +0200 [thread overview]
Message-ID: <202608302138.FQoQsbAf-lkp@intel.com> (raw)
In-Reply-To: <20260824074427.3226457-5-andriy.shevchenko@linux.intel.com>
Hi Andy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on brgl/gpio/for-next]
[also build test WARNING on linusw-pinctrl/devel linusw-pinctrl/for-next linus/master v7.2 next-20260828]
[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/Andy-Shevchenko/gpio-Split-fwnode_is_gpiochip-helper/20260824-094232
base: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link: https://lore.kernel.org/r/20260824074427.3226457-5-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 4/4] pinctrl: pistachio: Replace open coded fwnode_is_gpiochip()
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260830/202608302138.FQoQsbAf-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260830/202608302138.FQoQsbAf-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/202608302138.FQoQsbAf-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/gpio/gpiolib-cdev.c:15:
include/linux/gpio/driver.h:888:33: error: use of undeclared identifier 'child'
888 | return fwnode_property_present(child, "gpio-controller");
| ^~~~~
>> drivers/gpio/gpiolib-cdev.c:1650:2: warning: implicit conversion from '__size_t' (aka 'unsigned long') to 'unsigned int' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
1650 | INIT_KFIFO(lr->events);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/kfifo.h:135:69: note: expanded from macro 'INIT_KFIFO'
135 | __kfifo->mask = __is_kfifo_ptr(__tmp) ? 0 : ARRAY_SIZE(__tmp->buf) - 1;\
| ~ ~~~~~~~~~~~~~~~~~~~~~~~^~~
1 warning and 1 error generated.
vim +1650 drivers/gpio/gpiolib-cdev.c
96c02c906a44bc2 Kent Gibson 2026-02-16 1603
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1604 static int linereq_create(struct gpio_device *gdev, void __user *ip)
925ca36913fc7df Kent Gibson 2020-06-16 1605 {
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1606 struct gpio_v2_line_request ulr;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1607 struct gpio_v2_line_config *lc;
96c02c906a44bc2 Kent Gibson 2026-02-16 1608 struct linereq *lr __free(linereq_free) = NULL;
b1a92e94560def6 Kent Gibson 2022-07-14 1609 u64 flags, edflags;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1610 unsigned int i;
96c02c906a44bc2 Kent Gibson 2026-02-16 1611 int ret;
925ca36913fc7df Kent Gibson 2020-06-16 1612
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1613 if (copy_from_user(&ulr, ip, sizeof(ulr)))
925ca36913fc7df Kent Gibson 2020-06-16 1614 return -EFAULT;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1615
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1616 if ((ulr.num_lines == 0) || (ulr.num_lines > GPIO_V2_LINES_MAX))
925ca36913fc7df Kent Gibson 2020-06-16 1617 return -EINVAL;
925ca36913fc7df Kent Gibson 2020-06-16 1618
e106b1dd38e723e Andy Shevchenko 2024-11-10 1619 if (!mem_is_zero(ulr.padding, sizeof(ulr.padding)))
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1620 return -EINVAL;
925ca36913fc7df Kent Gibson 2020-06-16 1621
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1622 lc = &ulr.config;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1623 ret = gpio_v2_line_config_validate(lc, ulr.num_lines);
925ca36913fc7df Kent Gibson 2020-06-16 1624 if (ret)
925ca36913fc7df Kent Gibson 2020-06-16 1625 return ret;
925ca36913fc7df Kent Gibson 2020-06-16 1626
323bbfcf1ef8836 Linus Torvalds 2026-02-21 1627 lr = kvzalloc_flex(*lr, lines, ulr.num_lines);
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1628 if (!lr)
925ca36913fc7df Kent Gibson 2020-06-16 1629 return -ENOMEM;
a512635da9f7223 Kees Cook 2023-09-22 1630 lr->num_lines = ulr.num_lines;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1631
dc0989e3aa58dc4 Andy Shevchenko 2022-12-28 1632 lr->gdev = gpio_device_get(gdev);
925ca36913fc7df Kent Gibson 2020-06-16 1633
65cff70464068a8 Kent Gibson 2020-09-28 1634 for (i = 0; i < ulr.num_lines; i++) {
73e0341992b68bb Kent Gibson 2020-09-28 1635 lr->lines[i].req = lr;
65cff70464068a8 Kent Gibson 2020-09-28 1636 WRITE_ONCE(lr->lines[i].sw_debounced, 0);
65cff70464068a8 Kent Gibson 2020-09-28 1637 INIT_DELAYED_WORK(&lr->lines[i].work, debounce_work_func);
65cff70464068a8 Kent Gibson 2020-09-28 1638 }
73e0341992b68bb Kent Gibson 2020-09-28 1639
f188ac1251b909c Kent Gibson 2020-10-05 1640 if (ulr.consumer[0] != '\0') {
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1641 /* label is only initialized if consumer is set */
f188ac1251b909c Kent Gibson 2020-10-05 1642 lr->label = kstrndup(ulr.consumer, sizeof(ulr.consumer) - 1,
925ca36913fc7df Kent Gibson 2020-06-16 1643 GFP_KERNEL);
96c02c906a44bc2 Kent Gibson 2026-02-16 1644 if (!lr->label)
96c02c906a44bc2 Kent Gibson 2026-02-16 1645 return -ENOMEM;
925ca36913fc7df Kent Gibson 2020-06-16 1646 }
925ca36913fc7df Kent Gibson 2020-06-16 1647
a54756cb24eafac Kent Gibson 2020-09-28 1648 mutex_init(&lr->config_mutex);
73e0341992b68bb Kent Gibson 2020-09-28 1649 init_waitqueue_head(&lr->wait);
35d848e7a1cbba2 Kent Gibson 2024-05-29 @1650 INIT_KFIFO(lr->events);
73e0341992b68bb Kent Gibson 2020-09-28 1651 lr->event_buffer_size = ulr.event_buffer_size;
73e0341992b68bb Kent Gibson 2020-09-28 1652 if (lr->event_buffer_size == 0)
73e0341992b68bb Kent Gibson 2020-09-28 1653 lr->event_buffer_size = ulr.num_lines * 16;
73e0341992b68bb Kent Gibson 2020-09-28 1654 else if (lr->event_buffer_size > GPIO_V2_LINES_MAX * 16)
73e0341992b68bb Kent Gibson 2020-09-28 1655 lr->event_buffer_size = GPIO_V2_LINES_MAX * 16;
73e0341992b68bb Kent Gibson 2020-09-28 1656
73e0341992b68bb Kent Gibson 2020-09-28 1657 atomic_set(&lr->seqno, 0);
883f91981843712 Kent Gibson 2020-07-08 1658
925ca36913fc7df Kent Gibson 2020-06-16 1659 /* Request each GPIO */
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1660 for (i = 0; i < ulr.num_lines; i++) {
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1661 u32 offset = ulr.offsets[i];
f4e14d45d7fe95f Bartosz Golaszewski 2024-01-24 1662 struct gpio_desc *desc = gpio_device_get_desc(gdev, offset);
925ca36913fc7df Kent Gibson 2020-06-16 1663
96c02c906a44bc2 Kent Gibson 2026-02-16 1664 if (IS_ERR(desc))
96c02c906a44bc2 Kent Gibson 2026-02-16 1665 return PTR_ERR(desc);
925ca36913fc7df Kent Gibson 2020-06-16 1666
95a4eed7dd5b7c1 Andy Shevchenko 2022-02-01 1667 ret = gpiod_request_user(desc, lr->label);
925ca36913fc7df Kent Gibson 2020-06-16 1668 if (ret)
96c02c906a44bc2 Kent Gibson 2026-02-16 1669 return ret;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1670
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1671 lr->lines[i].desc = desc;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1672 flags = gpio_v2_line_config_flags(lc, i);
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1673 gpio_v2_line_config_flags_to_desc_flags(flags, &desc->flags);
925ca36913fc7df Kent Gibson 2020-06-16 1674
925ca36913fc7df Kent Gibson 2020-06-16 1675 ret = gpiod_set_transitory(desc, false);
925ca36913fc7df Kent Gibson 2020-06-16 1676 if (ret < 0)
96c02c906a44bc2 Kent Gibson 2026-02-16 1677 return ret;
925ca36913fc7df Kent Gibson 2020-06-16 1678
b1a92e94560def6 Kent Gibson 2022-07-14 1679 edflags = flags & GPIO_V2_LINE_EDGE_DETECTOR_FLAGS;
925ca36913fc7df Kent Gibson 2020-06-16 1680 /*
925ca36913fc7df Kent Gibson 2020-06-16 1681 * Lines have to be requested explicitly for input
925ca36913fc7df Kent Gibson 2020-06-16 1682 * or output, else the line will be treated "as is".
925ca36913fc7df Kent Gibson 2020-06-16 1683 */
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1684 if (flags & GPIO_V2_LINE_FLAG_OUTPUT) {
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1685 int val = gpio_v2_line_config_output_value(lc, i);
925ca36913fc7df Kent Gibson 2020-06-16 1686
07c61d4da43fa3b Bartosz Golaszewski 2024-10-18 1687 ret = gpiod_direction_output_nonotify(desc, val);
925ca36913fc7df Kent Gibson 2020-06-16 1688 if (ret)
96c02c906a44bc2 Kent Gibson 2026-02-16 1689 return ret;
3c0d9c635ae2b2c Kent Gibson 2020-09-28 1690 } else if (flags & GPIO_V2_LINE_FLAG_INPUT) {
07c61d4da43fa3b Bartosz Golaszewski 2024-10-18 1691 ret = gpiod_direction_input_nonotify(desc);
925ca36913fc7df Kent Gibson 2020-06-16 1692 if (ret)
96c02c906a44bc2 Kent Gibson 2026-02-16 1693 return ret;
73e0341992b68bb Kent Gibson 2020-09-28 1694
65cff70464068a8 Kent Gibson 2020-09-28 1695 ret = edge_detector_setup(&lr->lines[i], lc, i,
b1a92e94560def6 Kent Gibson 2022-07-14 1696 edflags);
73e0341992b68bb Kent Gibson 2020-09-28 1697 if (ret)
96c02c906a44bc2 Kent Gibson 2026-02-16 1698 return ret;
925ca36913fc7df Kent Gibson 2020-06-16 1699 }
925ca36913fc7df Kent Gibson 2020-06-16 1700
b1a92e94560def6 Kent Gibson 2022-07-14 1701 lr->lines[i].edflags = edflags;
b1a92e94560def6 Kent Gibson 2022-07-14 1702
9ce4ed5b4db1363 Bartosz Golaszewski 2023-08-21 1703 gpiod_line_state_notify(desc, GPIO_V2_LINE_CHANGED_REQUESTED);
925ca36913fc7df Kent Gibson 2020-06-16 1704
925ca36913fc7df Kent Gibson 2020-06-16 1705 dev_dbg(&gdev->dev, "registered chardev handle for line %d\n",
925ca36913fc7df Kent Gibson 2020-06-16 1706 offset);
925ca36913fc7df Kent Gibson 2020-06-16 1707 }
925ca36913fc7df Kent Gibson 2020-06-16 1708
a0dda508bd66b9e Bartosz Golaszewski 2023-08-17 1709 lr->device_unregistered_nb.notifier_call = linereq_unregistered_notify;
a0dda508bd66b9e Bartosz Golaszewski 2023-08-17 1710 ret = blocking_notifier_chain_register(&gdev->device_notifier,
a0dda508bd66b9e Bartosz Golaszewski 2023-08-17 1711 &lr->device_unregistered_nb);
a0dda508bd66b9e Bartosz Golaszewski 2023-08-17 1712 if (ret)
96c02c906a44bc2 Kent Gibson 2026-02-16 1713 return ret;
925ca36913fc7df Kent Gibson 2020-06-16 1714
96c02c906a44bc2 Kent Gibson 2026-02-16 1715 FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC,
96c02c906a44bc2 Kent Gibson 2026-02-16 1716 anon_inode_getfile("gpio-line", &line_fileops, lr,
96c02c906a44bc2 Kent Gibson 2026-02-16 1717 O_RDONLY | O_CLOEXEC));
96c02c906a44bc2 Kent Gibson 2026-02-16 1718 if (fdf.err)
96c02c906a44bc2 Kent Gibson 2026-02-16 1719 return fdf.err;
96c02c906a44bc2 Kent Gibson 2026-02-16 1720 retain_and_null_ptr(lr);
925ca36913fc7df Kent Gibson 2020-06-16 1721
96c02c906a44bc2 Kent Gibson 2026-02-16 1722 ulr.fd = fd_prepare_fd(fdf);
96c02c906a44bc2 Kent Gibson 2026-02-16 1723 if (copy_to_user(ip, &ulr, sizeof(ulr)))
925ca36913fc7df Kent Gibson 2020-06-16 1724 return -EFAULT;
925ca36913fc7df Kent Gibson 2020-06-16 1725
96c02c906a44bc2 Kent Gibson 2026-02-16 1726 fd_publish(fdf);
925ca36913fc7df Kent Gibson 2020-06-16 1727
925ca36913fc7df Kent Gibson 2020-06-16 1728 dev_dbg(&gdev->dev, "registered chardev handle for %d lines\n",
96c02c906a44bc2 Kent Gibson 2026-02-16 1729 ulr.num_lines);
925ca36913fc7df Kent Gibson 2020-06-16 1730
925ca36913fc7df Kent Gibson 2020-06-16 1731 return 0;
925ca36913fc7df Kent Gibson 2020-06-16 1732 }
925ca36913fc7df Kent Gibson 2020-06-16 1733
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-08-30 19:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 7:42 [PATCH v1 0/4] gpio: Unify the GPIO controller node check Andy Shevchenko
2026-08-24 7:42 ` [PATCH v1 1/4] gpio: Split fwnode_is_gpiochip() helper Andy Shevchenko
2026-08-24 7:42 ` [PATCH v1 2/4] gpio: shared: Replace open coded fwnode_is_gpiochip() Andy Shevchenko
2026-08-24 8:37 ` Andy Shevchenko
2026-08-24 7:42 ` [PATCH v1 3/4] pinctrl: ma35: " Andy Shevchenko
2026-09-14 8:30 ` Linus Walleij
2026-08-24 7:42 ` [PATCH v1 4/4] pinctrl: pistachio: " Andy Shevchenko
2026-08-30 14:57 ` kernel test robot
2026-08-30 19:31 ` kernel test robot [this message]
2026-08-30 21:13 ` kernel test robot
2026-08-26 10:33 ` [PATCH v1 0/4] gpio: Unify the GPIO controller node check Bartosz Golaszewski
2026-08-26 14:00 ` Andy Shevchenko
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=202608302138.FQoQsbAf-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=schung@nuvoton.com \
--cc=ychuang3@nuvoton.com \
/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.