All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155
@ 2026-05-04  1:50 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-05-04  1:50 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155
@ 2026-06-29 11:31 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-06-29 11:31 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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:   dc59e4fea9d83f03bad6bddf3fa2e52491777482
commit: 4d185fdeef67d0c2c5d4a142392cf1ade3786dd2 ACPI: RISC-V: Add support to update gsi range
date:   9 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 9 months ago
config: riscv-randconfig-r062-20260629 (https://download.01.org/0day-ci/archive/20260629/202606291919.3qKk5h1d-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 8.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/202606291919.3qKk5h1d-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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155
@ 2026-08-08  1:18 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-08-08  1:18 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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:   bcc44b6785f216eb939226ade6e3910baa30516b
commit: 4d185fdeef67d0c2c5d4a142392cf1ade3786dd2 ACPI: RISC-V: Add support to update gsi range
date:   11 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 11 months ago
config: riscv-randconfig-r063-20260807 (https://download.01.org/0day-ci/archive/20260808/202608080854.TQ2iA4Di-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

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/202608080854.TQ2iA4Di-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

e77b8dc02a1ca22 Sunil V L 2024-08-12  133  
e77b8dc02a1ca22 Sunil V L 2024-08-12  134  static int __init riscv_acpi_register_ext_intc(u32 gsi_base, u32 nr_irqs, u32 nr_idcs,
e77b8dc02a1ca22 Sunil V L 2024-08-12  135  					       u32 id, u32 type)
e77b8dc02a1ca22 Sunil V L 2024-08-12  136  {
4d185fdeef67d0c Sunil V L 2025-08-18  137  	struct riscv_ext_intc_list *ext_intc_element, *node, *prev;
e77b8dc02a1ca22 Sunil V L 2024-08-12  138  
e77b8dc02a1ca22 Sunil V L 2024-08-12  139  	ext_intc_element = kzalloc(sizeof(*ext_intc_element), GFP_KERNEL);
e77b8dc02a1ca22 Sunil V L 2024-08-12  140  	if (!ext_intc_element)
e77b8dc02a1ca22 Sunil V L 2024-08-12  141  		return -ENOMEM;
e77b8dc02a1ca22 Sunil V L 2024-08-12  142  
e77b8dc02a1ca22 Sunil V L 2024-08-12  143  	ext_intc_element->gsi_base = gsi_base;
4d185fdeef67d0c Sunil V L 2025-08-18  144  
4d185fdeef67d0c Sunil V L 2025-08-18  145  	/* If nr_irqs is zero, indicate it in flag and set to max range possible */
4d185fdeef67d0c Sunil V L 2025-08-18  146  	if (nr_irqs) {
e77b8dc02a1ca22 Sunil V L 2024-08-12  147  		ext_intc_element->nr_irqs = nr_irqs;
4d185fdeef67d0c Sunil V L 2025-08-18  148  	} else {
4d185fdeef67d0c Sunil V L 2025-08-18  149  		ext_intc_element->flag |= RISCV_ACPI_INTC_FLAG_PENDING;
4d185fdeef67d0c Sunil V L 2025-08-18  150  		ext_intc_element->nr_irqs = U32_MAX - ext_intc_element->gsi_base;
4d185fdeef67d0c Sunil V L 2025-08-18  151  	}
4d185fdeef67d0c Sunil V L 2025-08-18  152  
e77b8dc02a1ca22 Sunil V L 2024-08-12  153  	ext_intc_element->nr_idcs = nr_idcs;
e77b8dc02a1ca22 Sunil V L 2024-08-12  154  	ext_intc_element->id = id;
694b2ef1e73c5ee Sunil V L 2025-08-18 @155  	list_for_each_entry(node, &ext_intc_list, list) {
694b2ef1e73c5ee Sunil V L 2025-08-18  156  		if (node->gsi_base < ext_intc_element->gsi_base)
694b2ef1e73c5ee Sunil V L 2025-08-18  157  			break;
694b2ef1e73c5ee Sunil V L 2025-08-18  158  	}
694b2ef1e73c5ee Sunil V L 2025-08-18  159  
4d185fdeef67d0c Sunil V L 2025-08-18  160  	/* Adjust the previous node's GSI range if that has pending registration */
4d185fdeef67d0c Sunil V L 2025-08-18 @161  	prev = list_prev_entry(node, list);
4d185fdeef67d0c Sunil V L 2025-08-18  162  	if (!list_entry_is_head(prev, &ext_intc_list, list)) {
4d185fdeef67d0c Sunil V L 2025-08-18  163  		if (prev->flag & RISCV_ACPI_INTC_FLAG_PENDING)
4d185fdeef67d0c Sunil V L 2025-08-18  164  			prev->nr_irqs = ext_intc_element->gsi_base - prev->gsi_base;
4d185fdeef67d0c Sunil V L 2025-08-18  165  	}
4d185fdeef67d0c Sunil V L 2025-08-18  166  
694b2ef1e73c5ee Sunil V L 2025-08-18  167  	list_add_tail(&ext_intc_element->list, &node->list);
e77b8dc02a1ca22 Sunil V L 2024-08-12  168  	return 0;
e77b8dc02a1ca22 Sunil V L 2024-08-12  169  }
e77b8dc02a1ca22 Sunil V L 2024-08-12  170  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-08  1:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08  1:18 drivers/acpi/riscv/irq.c:161:24-28: ERROR: invalid reference to the index variable of the iterator on line 155 kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-29 11:31 kernel test robot
2026-05-04  1:50 kernel test robot

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.