drivers/mailbox/bcm74110-mailbox.c:237:8-11: ERROR: invalid reference to the index variable of the iterator on line 224
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <[email protected]> |
BCC: [email protected] CC: [email protected] CC: [email protected] TO: Justin Chen <[email protected]> CC: Jassi Brar <[email protected]> CC: Florian Fainelli <[email protected]> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3d6d817622b0a9721e3cc404df3469171582be13 commit: 52436007b862a90348ac8efc3a89eaceb2234f53 mailbox: Add support for bcm74110 date: 1 year ago :::::: branch date: 2 days ago :::::: commit date: 1 year ago config: powerpc-randconfig-r053-20260812 (https://download.01.org/0day-ci/archive/20260814/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea) 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: 52436007b862 ("mailbox: Add support for bcm74110") | Reported-by: kernel test robot <[email protected]> | Reported-by: Julia Lawall <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ cocci warnings: (new ones prefixed by >>) >> drivers/mailbox/bcm74110-mailbox.c:237:8-11: ERROR: invalid reference to the index variable of the iterator on line 224 vim +237 drivers/mailbox/bcm74110-mailbox.c 52436007b862a9 Justin Chen 2025-06-02 215 52436007b862a9 Justin Chen 2025-06-02 216 static int bcm74110_rx_pop_init_msg(struct bcm74110_mbox *mbox, u32 func_type, 52436007b862a9 Justin Chen 2025-06-02 217 u32 *val) 52436007b862a9 Justin Chen 2025-06-02 218 { 52436007b862a9 Justin Chen 2025-06-02 219 struct bcm74110_mbox_msg *msg, *msg_tmp; 52436007b862a9 Justin Chen 2025-06-02 220 unsigned long flags; 52436007b862a9 Justin Chen 2025-06-02 221 bool found = false; 52436007b862a9 Justin Chen 2025-06-02 222 52436007b862a9 Justin Chen 2025-06-02 223 spin_lock_irqsave(&mbox->rx_svc_list_lock, flags); 52436007b862a9 Justin Chen 2025-06-02 @224 list_for_each_entry_safe(msg, msg_tmp, &mbox->rx_svc_init_list, 52436007b862a9 Justin Chen 2025-06-02 225 list_entry) { 52436007b862a9 Justin Chen 2025-06-02 226 if (BCM_MSG_GET_FIELD(msg->msg, FUNC) == func_type) { 52436007b862a9 Justin Chen 2025-06-02 227 list_del(&msg->list_entry); 52436007b862a9 Justin Chen 2025-06-02 228 found = true; 52436007b862a9 Justin Chen 2025-06-02 229 break; 52436007b862a9 Justin Chen 2025-06-02 230 } 52436007b862a9 Justin Chen 2025-06-02 231 } 52436007b862a9 Justin Chen 2025-06-02 232 spin_unlock_irqrestore(&mbox->rx_svc_list_lock, flags); 52436007b862a9 Justin Chen 2025-06-02 233 52436007b862a9 Justin Chen 2025-06-02 234 if (!found) 52436007b862a9 Justin Chen 2025-06-02 235 return -EINVAL; 52436007b862a9 Justin Chen 2025-06-02 236 52436007b862a9 Justin Chen 2025-06-02 @237 *val = msg->msg; 52436007b862a9 Justin Chen 2025-06-02 238 kfree(msg); 52436007b862a9 Justin Chen 2025-06-02 239 52436007b862a9 Justin Chen 2025-06-02 240 return 0; 52436007b862a9 Justin Chen 2025-06-02 241 } 52436007b862a9 Justin Chen 2025-06-02 242 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki