* lib/test_context-analysis.c:114 test_spinlock_trylock_extra() warn: mixing irq and irqsave
@ 2026-08-07 21:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-07 21:58 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Marco Elver <elver@google.com>
CC: Peter Zijlstra <peterz@infradead.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3f008280327ba5ad132965abab0c7846283cef0c
commit: f16a802d402d735a55731f8c94952b3bbb5ddfe8 locking/rwlock, spinlock: Support Clang's context analysis
date: 7 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 7 months ago
config: openrisc-randconfig-r073-20260807 (https://download.01.org/0day-ci/archive/20260808/202608080540.g9LgU6ec-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9187-g5189e3fb
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: f16a802d402d ("locking/rwlock, spinlock: Support Clang's context analysis")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608080540.g9LgU6ec-lkp@intel.com/
New smatch warnings:
lib/test_context-analysis.c:114 test_spinlock_trylock_extra() warn: mixing irq and irqsave
Old smatch warnings:
lib/test_context-analysis.c:90 test_raw_spinlock_trylock_extra() warn: mixing irq and irqsave
include/linux/spinlock.h:556 class_raw_spinlock_try_constructor() warn: passing zero to 'ERR_PTR'
include/linux/spinlock.h:604 class_spinlock_try_constructor() warn: passing zero to 'ERR_PTR'
vim +114 lib/test_context-analysis.c
f16a802d402d73 Marco Elver 2025-12-19 98
f16a802d402d73 Marco Elver 2025-12-19 99 TEST_SPINLOCK_COMMON(spinlock,
f16a802d402d73 Marco Elver 2025-12-19 100 spinlock_t,
f16a802d402d73 Marco Elver 2025-12-19 101 spin_lock_init,
f16a802d402d73 Marco Elver 2025-12-19 102 spin_lock,
f16a802d402d73 Marco Elver 2025-12-19 103 spin_unlock,
f16a802d402d73 Marco Elver 2025-12-19 104 spin_trylock,
f16a802d402d73 Marco Elver 2025-12-19 105 TEST_OP_RW);
f16a802d402d73 Marco Elver 2025-12-19 106 static void __used test_spinlock_trylock_extra(struct test_spinlock_data *d)
f16a802d402d73 Marco Elver 2025-12-19 107 {
f16a802d402d73 Marco Elver 2025-12-19 108 unsigned long flags;
f16a802d402d73 Marco Elver 2025-12-19 109
f16a802d402d73 Marco Elver 2025-12-19 110 if (spin_trylock_irq(&d->lock)) {
f16a802d402d73 Marco Elver 2025-12-19 111 d->counter++;
f16a802d402d73 Marco Elver 2025-12-19 112 spin_unlock_irq(&d->lock);
f16a802d402d73 Marco Elver 2025-12-19 113 }
f16a802d402d73 Marco Elver 2025-12-19 @114 if (spin_trylock_irqsave(&d->lock, flags)) {
f16a802d402d73 Marco Elver 2025-12-19 115 d->counter++;
f16a802d402d73 Marco Elver 2025-12-19 116 spin_unlock_irqrestore(&d->lock, flags);
f16a802d402d73 Marco Elver 2025-12-19 117 }
f16a802d402d73 Marco Elver 2025-12-19 118 scoped_cond_guard(spinlock_try, return, &d->lock) {
f16a802d402d73 Marco Elver 2025-12-19 119 d->counter++;
f16a802d402d73 Marco Elver 2025-12-19 120 }
f16a802d402d73 Marco Elver 2025-12-19 121 }
f16a802d402d73 Marco Elver 2025-12-19 122
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-07 21:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 21:58 lib/test_context-analysis.c:114 test_spinlock_trylock_extra() warn: mixing irq and irqsave 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.