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/spi/spi-offload.c:181:15-22: ERROR: invalid reference to the index variable of the iterator on line 169
Date: Tue, 24 Mar 2026 22:43:48 +0800 [thread overview]
Message-ID: <202603242208.t9WC0vYe-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: David Lechner <dlechner@baylibre.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Nuno Sa <nuno.sa@analog.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c369299895a591d96745d6492d4888259b004a9e
commit: cbc986cda57a0488069f7c6bda7e16cd592e8157 iio: adc: ad7944: add support for SPI offload
date: 1 year, 1 month ago
:::::: branch date: 2 days ago
:::::: commit date: 1 year, 1 month ago
config: s390-randconfig-r052-20260323 (https://download.01.org/0day-ci/archive/20260324/202603242208.t9WC0vYe-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c911b8492374942bf4cfe35411e90a35d3837f6a)
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/202603242208.t9WC0vYe-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/spi/spi-offload.c:181:15-22: ERROR: invalid reference to the index variable of the iterator on line 169
vim +181 drivers/spi/spi-offload.c
d7231be4b4657e David Lechner 2025-02-07 158
d7231be4b4657e David Lechner 2025-02-07 159 static struct spi_offload_trigger
d7231be4b4657e David Lechner 2025-02-07 160 *spi_offload_trigger_get(enum spi_offload_trigger_type type,
d7231be4b4657e David Lechner 2025-02-07 161 struct fwnode_reference_args *args)
d7231be4b4657e David Lechner 2025-02-07 162 {
d7231be4b4657e David Lechner 2025-02-07 163 struct spi_offload_trigger *trigger;
d7231be4b4657e David Lechner 2025-02-07 164 bool match = false;
d7231be4b4657e David Lechner 2025-02-07 165 int ret;
d7231be4b4657e David Lechner 2025-02-07 166
d7231be4b4657e David Lechner 2025-02-07 167 guard(mutex)(&spi_offload_triggers_lock);
d7231be4b4657e David Lechner 2025-02-07 168
d7231be4b4657e David Lechner 2025-02-07 @169 list_for_each_entry(trigger, &spi_offload_triggers, list) {
d7231be4b4657e David Lechner 2025-02-07 170 if (trigger->fwnode != args->fwnode)
d7231be4b4657e David Lechner 2025-02-07 171 continue;
d7231be4b4657e David Lechner 2025-02-07 172
d7231be4b4657e David Lechner 2025-02-07 173 match = trigger->ops->match(trigger, type, args->args, args->nargs);
d7231be4b4657e David Lechner 2025-02-07 174 if (match)
d7231be4b4657e David Lechner 2025-02-07 175 break;
d7231be4b4657e David Lechner 2025-02-07 176 }
d7231be4b4657e David Lechner 2025-02-07 177
d7231be4b4657e David Lechner 2025-02-07 178 if (!match)
d7231be4b4657e David Lechner 2025-02-07 179 return ERR_PTR(-EPROBE_DEFER);
d7231be4b4657e David Lechner 2025-02-07 180
d7231be4b4657e David Lechner 2025-02-07 @181 guard(mutex)(&trigger->lock);
d7231be4b4657e David Lechner 2025-02-07 182
d7231be4b4657e David Lechner 2025-02-07 183 if (!trigger->ops)
d7231be4b4657e David Lechner 2025-02-07 184 return ERR_PTR(-ENODEV);
d7231be4b4657e David Lechner 2025-02-07 185
d7231be4b4657e David Lechner 2025-02-07 186 if (trigger->ops->request) {
d7231be4b4657e David Lechner 2025-02-07 187 ret = trigger->ops->request(trigger, type, args->args, args->nargs);
d7231be4b4657e David Lechner 2025-02-07 188 if (ret)
d7231be4b4657e David Lechner 2025-02-07 189 return ERR_PTR(ret);
d7231be4b4657e David Lechner 2025-02-07 190 }
d7231be4b4657e David Lechner 2025-02-07 191
d7231be4b4657e David Lechner 2025-02-07 192 kref_get(&trigger->ref);
d7231be4b4657e David Lechner 2025-02-07 193
d7231be4b4657e David Lechner 2025-02-07 194 return trigger;
d7231be4b4657e David Lechner 2025-02-07 195 }
d7231be4b4657e David Lechner 2025-02-07 196
:::::: The code at line 181 was first introduced by commit
:::::: d7231be4b4657e5f922a4c6dc11e8dffc71fee87 spi: offload: add support for hardware triggers
:::::: TO: David Lechner <dlechner@baylibre.com>
:::::: CC: Mark Brown <broonie@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-03-24 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 14:43 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-02 13:28 drivers/spi/spi-offload.c:181:15-22: ERROR: invalid reference to the index variable of the iterator on line 169 kernel test robot
2026-01-01 16:06 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=202603242208.t9WC0vYe-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.