From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155
Date: Mon, 04 May 2026 09:50:17 +0800 [thread overview]
Message-ID: <202605040952.mqtlmoev-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Sunil V L <sunilvl@ventanamicro.com>
CC: Paul Walmsley <pjw@kernel.org>
CC: Anup Patel <apatel@ventanamicro.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6d35786de28116ecf78797a62b84e6bf3c45aa5a
commit: 4d185fdeef67d0c2c5d4a142392cf1ade3786dd2 ACPI: RISC-V: Add support to update gsi range
date: 7 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 7 months ago
config: riscv-randconfig-r064-20260504 (https://download.01.org/0day-ci/archive/20260504/202605040952.mqtlmoev-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.5.0
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
| Fixes: 4d185fdeef67 ("ACPI: RISC-V: Add support to update gsi range")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202605040952.mqtlmoev-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155
vim +161 drivers/acpi/riscv/irq.c
e77b8dc02a1ca2 Sunil V L 2024-08-12 133
e77b8dc02a1ca2 Sunil V L 2024-08-12 134 static int __init riscv_acpi_register_ext_intc(u32 gsi_base, u32 nr_irqs, u32 nr_idcs,
e77b8dc02a1ca2 Sunil V L 2024-08-12 135 u32 id, u32 type)
e77b8dc02a1ca2 Sunil V L 2024-08-12 136 {
4d185fdeef67d0 Sunil V L 2025-08-18 137 struct riscv_ext_intc_list *ext_intc_element, *node, *prev;
e77b8dc02a1ca2 Sunil V L 2024-08-12 138
e77b8dc02a1ca2 Sunil V L 2024-08-12 139 ext_intc_element = kzalloc(sizeof(*ext_intc_element), GFP_KERNEL);
e77b8dc02a1ca2 Sunil V L 2024-08-12 140 if (!ext_intc_element)
e77b8dc02a1ca2 Sunil V L 2024-08-12 141 return -ENOMEM;
e77b8dc02a1ca2 Sunil V L 2024-08-12 142
e77b8dc02a1ca2 Sunil V L 2024-08-12 143 ext_intc_element->gsi_base = gsi_base;
4d185fdeef67d0 Sunil V L 2025-08-18 144
4d185fdeef67d0 Sunil V L 2025-08-18 145 /* If nr_irqs is zero, indicate it in flag and set to max range possible */
4d185fdeef67d0 Sunil V L 2025-08-18 146 if (nr_irqs) {
e77b8dc02a1ca2 Sunil V L 2024-08-12 147 ext_intc_element->nr_irqs = nr_irqs;
4d185fdeef67d0 Sunil V L 2025-08-18 148 } else {
4d185fdeef67d0 Sunil V L 2025-08-18 149 ext_intc_element->flag |= RISCV_ACPI_INTC_FLAG_PENDING;
4d185fdeef67d0 Sunil V L 2025-08-18 150 ext_intc_element->nr_irqs = U32_MAX - ext_intc_element->gsi_base;
4d185fdeef67d0 Sunil V L 2025-08-18 151 }
4d185fdeef67d0 Sunil V L 2025-08-18 152
e77b8dc02a1ca2 Sunil V L 2024-08-12 153 ext_intc_element->nr_idcs = nr_idcs;
e77b8dc02a1ca2 Sunil V L 2024-08-12 154 ext_intc_element->id = id;
694b2ef1e73c5e Sunil V L 2025-08-18 @155 list_for_each_entry(node, &ext_intc_list, list) {
694b2ef1e73c5e Sunil V L 2025-08-18 156 if (node->gsi_base < ext_intc_element->gsi_base)
694b2ef1e73c5e Sunil V L 2025-08-18 157 break;
694b2ef1e73c5e Sunil V L 2025-08-18 158 }
694b2ef1e73c5e Sunil V L 2025-08-18 159
4d185fdeef67d0 Sunil V L 2025-08-18 160 /* Adjust the previous node's GSI range if that has pending registration */
4d185fdeef67d0 Sunil V L 2025-08-18 @161 prev = list_prev_entry(node, list);
4d185fdeef67d0 Sunil V L 2025-08-18 162 if (!list_entry_is_head(prev, &ext_intc_list, list)) {
4d185fdeef67d0 Sunil V L 2025-08-18 163 if (prev->flag & RISCV_ACPI_INTC_FLAG_PENDING)
4d185fdeef67d0 Sunil V L 2025-08-18 164 prev->nr_irqs = ext_intc_element->gsi_base - prev->gsi_base;
4d185fdeef67d0 Sunil V L 2025-08-18 165 }
4d185fdeef67d0 Sunil V L 2025-08-18 166
694b2ef1e73c5e Sunil V L 2025-08-18 167 list_add_tail(&ext_intc_element->list, &node->list);
e77b8dc02a1ca2 Sunil V L 2024-08-12 168 return 0;
e77b8dc02a1ca2 Sunil V L 2024-08-12 169 }
e77b8dc02a1ca2 Sunil V L 2024-08-12 170
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-05-04 1:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 1:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-29 11:31 drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155 kernel test robot
2026-08-08 1:18 kernel test robot
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=202605040952.mqtlmoev-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@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.