* drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148
@ 2025-05-30 12:42 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-05-30 12:42 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: Sudeep Holla <sudeep.holla@arm.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f66bc387efbee59978e076ce9bf123ac353b389c
commit: be61da938576671c664382a059f961d7b4b2fc41 firmware: arm_ffa: Allow multiple UUIDs per partition to register SRI callback
date: 3 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 3 months ago
config: arm64-randconfig-r064-20250530 (https://download.01.org/0day-ci/archive/20250530/202505302007.D7owsaRu-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202505302007.D7owsaRu-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148
vim +1152 drivers/firmware/arm_ffa/driver.c
e0573444edbf4ee Sudeep Holla 2023-10-05 1130
be61da938576671 Sudeep Holla 2025-02-17 1131 static int
be61da938576671 Sudeep Holla 2025-02-17 1132 ffa_sched_recv_cb_update(struct ffa_device *dev, ffa_sched_recv_cb callback,
0184450b8b1e773 Sudeep Holla 2023-10-05 1133 void *cb_data, bool is_registration)
0184450b8b1e773 Sudeep Holla 2023-10-05 1134 {
be61da938576671 Sudeep Holla 2025-02-17 1135 struct ffa_dev_part_info *partition = NULL, *tmp;
be61da938576671 Sudeep Holla 2025-02-17 1136 struct list_head *phead;
0184450b8b1e773 Sudeep Holla 2023-10-05 1137 bool cb_valid;
0184450b8b1e773 Sudeep Holla 2023-10-05 1138
f4bfcaee34bc952 Sudeep Holla 2023-10-24 1139 if (ffa_notifications_disabled())
f4bfcaee34bc952 Sudeep Holla 2023-10-24 1140 return -EOPNOTSUPP;
f4bfcaee34bc952 Sudeep Holla 2023-10-24 1141
be61da938576671 Sudeep Holla 2025-02-17 1142 phead = xa_load(&drv_info->partition_info, dev->vm_id);
be61da938576671 Sudeep Holla 2025-02-17 1143 if (!phead) {
be61da938576671 Sudeep Holla 2025-02-17 1144 pr_err("%s: Invalid partition ID 0x%x\n", __func__, dev->vm_id);
be61da938576671 Sudeep Holla 2025-02-17 1145 return -EINVAL;
be61da938576671 Sudeep Holla 2025-02-17 1146 }
be61da938576671 Sudeep Holla 2025-02-17 1147
be61da938576671 Sudeep Holla 2025-02-17 @1148 list_for_each_entry_safe(partition, tmp, phead, node)
be61da938576671 Sudeep Holla 2025-02-17 1149 if (partition->dev == dev)
be61da938576671 Sudeep Holla 2025-02-17 1150 break;
be61da938576671 Sudeep Holla 2025-02-17 1151
c00d9738fd5fce1 Cristian Marussi 2024-01-08 @1152 if (!partition) {
be61da938576671 Sudeep Holla 2025-02-17 1153 pr_err("%s: No such partition ID 0x%x\n", __func__, dev->vm_id);
c00d9738fd5fce1 Cristian Marussi 2024-01-08 1154 return -EINVAL;
c00d9738fd5fce1 Cristian Marussi 2024-01-08 1155 }
c00d9738fd5fce1 Cristian Marussi 2024-01-08 1156
0184450b8b1e773 Sudeep Holla 2023-10-05 1157 write_lock(&partition->rw_lock);
0184450b8b1e773 Sudeep Holla 2023-10-05 1158
0184450b8b1e773 Sudeep Holla 2023-10-05 1159 cb_valid = !!partition->callback;
0184450b8b1e773 Sudeep Holla 2023-10-05 1160 if (!(is_registration ^ cb_valid)) {
0184450b8b1e773 Sudeep Holla 2023-10-05 1161 write_unlock(&partition->rw_lock);
0184450b8b1e773 Sudeep Holla 2023-10-05 1162 return -EINVAL;
0184450b8b1e773 Sudeep Holla 2023-10-05 1163 }
0184450b8b1e773 Sudeep Holla 2023-10-05 1164
0184450b8b1e773 Sudeep Holla 2023-10-05 1165 partition->callback = callback;
0184450b8b1e773 Sudeep Holla 2023-10-05 1166 partition->cb_data = cb_data;
0184450b8b1e773 Sudeep Holla 2023-10-05 1167
0184450b8b1e773 Sudeep Holla 2023-10-05 1168 write_unlock(&partition->rw_lock);
0184450b8b1e773 Sudeep Holla 2023-10-05 1169 return 0;
0184450b8b1e773 Sudeep Holla 2023-10-05 1170 }
0184450b8b1e773 Sudeep Holla 2023-10-05 1171
:::::: The code at line 1152 was first introduced by commit
:::::: c00d9738fd5fce15dc5494d05b7599dce23e8146 firmware: arm_ffa: Check xa_load() return value
:::::: TO: Cristian Marussi <cristian.marussi@arm.com>
:::::: CC: Sudeep Holla <sudeep.holla@arm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148
@ 2025-12-13 14:10 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-12-13 14:10 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: Sudeep Holla <sudeep.holla@arm.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d9c1cfec01cdbf24bd9322ed555713a20422115
commit: be61da938576671c664382a059f961d7b4b2fc41 firmware: arm_ffa: Allow multiple UUIDs per partition to register SRI callback
date: 10 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 10 months ago
config: arm64-randconfig-r064-20251213 (https://download.01.org/0day-ci/archive/20251213/202512132240.EHim8dg2-lkp@intel.com/config)
compiler: aarch64-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
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202512132240.EHim8dg2-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148
vim +1152 drivers/firmware/arm_ffa/driver.c
e0573444edbf4e Sudeep Holla 2023-10-05 1130
be61da93857667 Sudeep Holla 2025-02-17 1131 static int
be61da93857667 Sudeep Holla 2025-02-17 1132 ffa_sched_recv_cb_update(struct ffa_device *dev, ffa_sched_recv_cb callback,
0184450b8b1e77 Sudeep Holla 2023-10-05 1133 void *cb_data, bool is_registration)
0184450b8b1e77 Sudeep Holla 2023-10-05 1134 {
be61da93857667 Sudeep Holla 2025-02-17 1135 struct ffa_dev_part_info *partition = NULL, *tmp;
be61da93857667 Sudeep Holla 2025-02-17 1136 struct list_head *phead;
0184450b8b1e77 Sudeep Holla 2023-10-05 1137 bool cb_valid;
0184450b8b1e77 Sudeep Holla 2023-10-05 1138
f4bfcaee34bc95 Sudeep Holla 2023-10-24 1139 if (ffa_notifications_disabled())
f4bfcaee34bc95 Sudeep Holla 2023-10-24 1140 return -EOPNOTSUPP;
f4bfcaee34bc95 Sudeep Holla 2023-10-24 1141
be61da93857667 Sudeep Holla 2025-02-17 1142 phead = xa_load(&drv_info->partition_info, dev->vm_id);
be61da93857667 Sudeep Holla 2025-02-17 1143 if (!phead) {
be61da93857667 Sudeep Holla 2025-02-17 1144 pr_err("%s: Invalid partition ID 0x%x\n", __func__, dev->vm_id);
be61da93857667 Sudeep Holla 2025-02-17 1145 return -EINVAL;
be61da93857667 Sudeep Holla 2025-02-17 1146 }
be61da93857667 Sudeep Holla 2025-02-17 1147
be61da93857667 Sudeep Holla 2025-02-17 @1148 list_for_each_entry_safe(partition, tmp, phead, node)
be61da93857667 Sudeep Holla 2025-02-17 1149 if (partition->dev == dev)
be61da93857667 Sudeep Holla 2025-02-17 1150 break;
be61da93857667 Sudeep Holla 2025-02-17 1151
c00d9738fd5fce Cristian Marussi 2024-01-08 @1152 if (!partition) {
be61da93857667 Sudeep Holla 2025-02-17 1153 pr_err("%s: No such partition ID 0x%x\n", __func__, dev->vm_id);
c00d9738fd5fce Cristian Marussi 2024-01-08 1154 return -EINVAL;
c00d9738fd5fce Cristian Marussi 2024-01-08 1155 }
c00d9738fd5fce Cristian Marussi 2024-01-08 1156
0184450b8b1e77 Sudeep Holla 2023-10-05 1157 write_lock(&partition->rw_lock);
0184450b8b1e77 Sudeep Holla 2023-10-05 1158
0184450b8b1e77 Sudeep Holla 2023-10-05 1159 cb_valid = !!partition->callback;
0184450b8b1e77 Sudeep Holla 2023-10-05 1160 if (!(is_registration ^ cb_valid)) {
0184450b8b1e77 Sudeep Holla 2023-10-05 1161 write_unlock(&partition->rw_lock);
0184450b8b1e77 Sudeep Holla 2023-10-05 1162 return -EINVAL;
0184450b8b1e77 Sudeep Holla 2023-10-05 1163 }
0184450b8b1e77 Sudeep Holla 2023-10-05 1164
0184450b8b1e77 Sudeep Holla 2023-10-05 1165 partition->callback = callback;
0184450b8b1e77 Sudeep Holla 2023-10-05 1166 partition->cb_data = cb_data;
0184450b8b1e77 Sudeep Holla 2023-10-05 1167
0184450b8b1e77 Sudeep Holla 2023-10-05 1168 write_unlock(&partition->rw_lock);
0184450b8b1e77 Sudeep Holla 2023-10-05 1169 return 0;
0184450b8b1e77 Sudeep Holla 2023-10-05 1170 }
0184450b8b1e77 Sudeep Holla 2023-10-05 1171
:::::: The code at line 1152 was first introduced by commit
:::::: c00d9738fd5fce15dc5494d05b7599dce23e8146 firmware: arm_ffa: Check xa_load() return value
:::::: TO: Cristian Marussi <cristian.marussi@arm.com>
:::::: CC: Sudeep Holla <sudeep.holla@arm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148
@ 2026-01-22 7:54 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-01-22 7:54 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: Sudeep Holla <sudeep.holla@arm.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a66191c590b3b58eaff05d2277971f854772bd5b
commit: be61da938576671c664382a059f961d7b4b2fc41 firmware: arm_ffa: Allow multiple UUIDs per partition to register SRI callback
date: 11 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 11 months ago
config: arm64-randconfig-r051-20260122 (https://download.01.org/0day-ci/archive/20260122/202601221517.AQcrkqex-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 10.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
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202601221517.AQcrkqex-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148
vim +1152 drivers/firmware/arm_ffa/driver.c
e0573444edbf4e Sudeep Holla 2023-10-05 1130
be61da93857667 Sudeep Holla 2025-02-17 1131 static int
be61da93857667 Sudeep Holla 2025-02-17 1132 ffa_sched_recv_cb_update(struct ffa_device *dev, ffa_sched_recv_cb callback,
0184450b8b1e77 Sudeep Holla 2023-10-05 1133 void *cb_data, bool is_registration)
0184450b8b1e77 Sudeep Holla 2023-10-05 1134 {
be61da93857667 Sudeep Holla 2025-02-17 1135 struct ffa_dev_part_info *partition = NULL, *tmp;
be61da93857667 Sudeep Holla 2025-02-17 1136 struct list_head *phead;
0184450b8b1e77 Sudeep Holla 2023-10-05 1137 bool cb_valid;
0184450b8b1e77 Sudeep Holla 2023-10-05 1138
f4bfcaee34bc95 Sudeep Holla 2023-10-24 1139 if (ffa_notifications_disabled())
f4bfcaee34bc95 Sudeep Holla 2023-10-24 1140 return -EOPNOTSUPP;
f4bfcaee34bc95 Sudeep Holla 2023-10-24 1141
be61da93857667 Sudeep Holla 2025-02-17 1142 phead = xa_load(&drv_info->partition_info, dev->vm_id);
be61da93857667 Sudeep Holla 2025-02-17 1143 if (!phead) {
be61da93857667 Sudeep Holla 2025-02-17 1144 pr_err("%s: Invalid partition ID 0x%x\n", __func__, dev->vm_id);
be61da93857667 Sudeep Holla 2025-02-17 1145 return -EINVAL;
be61da93857667 Sudeep Holla 2025-02-17 1146 }
be61da93857667 Sudeep Holla 2025-02-17 1147
be61da93857667 Sudeep Holla 2025-02-17 @1148 list_for_each_entry_safe(partition, tmp, phead, node)
be61da93857667 Sudeep Holla 2025-02-17 1149 if (partition->dev == dev)
be61da93857667 Sudeep Holla 2025-02-17 1150 break;
be61da93857667 Sudeep Holla 2025-02-17 1151
c00d9738fd5fce Cristian Marussi 2024-01-08 @1152 if (!partition) {
be61da93857667 Sudeep Holla 2025-02-17 1153 pr_err("%s: No such partition ID 0x%x\n", __func__, dev->vm_id);
c00d9738fd5fce Cristian Marussi 2024-01-08 1154 return -EINVAL;
c00d9738fd5fce Cristian Marussi 2024-01-08 1155 }
c00d9738fd5fce Cristian Marussi 2024-01-08 1156
0184450b8b1e77 Sudeep Holla 2023-10-05 1157 write_lock(&partition->rw_lock);
0184450b8b1e77 Sudeep Holla 2023-10-05 1158
0184450b8b1e77 Sudeep Holla 2023-10-05 1159 cb_valid = !!partition->callback;
0184450b8b1e77 Sudeep Holla 2023-10-05 1160 if (!(is_registration ^ cb_valid)) {
0184450b8b1e77 Sudeep Holla 2023-10-05 1161 write_unlock(&partition->rw_lock);
0184450b8b1e77 Sudeep Holla 2023-10-05 1162 return -EINVAL;
0184450b8b1e77 Sudeep Holla 2023-10-05 1163 }
0184450b8b1e77 Sudeep Holla 2023-10-05 1164
0184450b8b1e77 Sudeep Holla 2023-10-05 1165 partition->callback = callback;
0184450b8b1e77 Sudeep Holla 2023-10-05 1166 partition->cb_data = cb_data;
0184450b8b1e77 Sudeep Holla 2023-10-05 1167
0184450b8b1e77 Sudeep Holla 2023-10-05 1168 write_unlock(&partition->rw_lock);
0184450b8b1e77 Sudeep Holla 2023-10-05 1169 return 0;
0184450b8b1e77 Sudeep Holla 2023-10-05 1170 }
0184450b8b1e77 Sudeep Holla 2023-10-05 1171
:::::: The code at line 1152 was first introduced by commit
:::::: c00d9738fd5fce15dc5494d05b7599dce23e8146 firmware: arm_ffa: Check xa_load() return value
:::::: TO: Cristian Marussi <cristian.marussi@arm.com>
:::::: CC: Sudeep Holla <sudeep.holla@arm.com>
--
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-01-22 7:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30 12:42 drivers/firmware/arm_ffa/driver.c:1152:6-15: ERROR: invalid reference to the index variable of the iterator on line 1148 kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-12-13 14:10 kernel test robot
2026-01-22 7:54 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.