All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip:locking/core 11/43] lib/test_context-analysis.c:90 test_raw_spinlock_trylock_extra() warn: mixing irq and irqsave
@ 2026-06-12  2:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-12  2:46 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
CC: x86@kernel.org
TO: Marco Elver <elver@google.com>
CC: Peter Zijlstra <peterz@infradead.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head:   a837dd95e841586c3a6bbe41c41843b392a1b725
commit: f16a802d402d735a55731f8c94952b3bbb5ddfe8 [11/43] locking/rwlock, spinlock: Support Clang's context analysis
:::::: branch date: 3 days ago
:::::: commit date: 5 months ago
config: csky-randconfig-r072-20260611 (https://download.01.org/0day-ci/archive/20260612/202606121053.UIaYGcgP-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.3.0
smatch: v0.5.0-9185-gbcc58b9c

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: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202606121053.UIaYGcgP-lkp@intel.com/

New smatch warnings:
lib/test_context-analysis.c:90 test_raw_spinlock_trylock_extra() warn: mixing irq and irqsave
include/linux/spinlock.h:604 class_spinlock_try_constructor() warn: passing zero to 'ERR_PTR'

Old smatch warnings:
include/linux/spinlock.h:556 class_raw_spinlock_try_constructor() warn: passing zero to 'ERR_PTR'
lib/test_context-analysis.c:114 test_spinlock_trylock_extra() warn: mixing irq and irqsave

vim +90 lib/test_context-analysis.c

f16a802d402d73 Marco Elver 2025-12-19  74  
f16a802d402d73 Marco Elver 2025-12-19  75  TEST_SPINLOCK_COMMON(raw_spinlock,
f16a802d402d73 Marco Elver 2025-12-19  76  		     raw_spinlock_t,
f16a802d402d73 Marco Elver 2025-12-19  77  		     raw_spin_lock_init,
f16a802d402d73 Marco Elver 2025-12-19  78  		     raw_spin_lock,
f16a802d402d73 Marco Elver 2025-12-19  79  		     raw_spin_unlock,
f16a802d402d73 Marco Elver 2025-12-19  80  		     raw_spin_trylock,
f16a802d402d73 Marco Elver 2025-12-19  81  		     TEST_OP_RW);
f16a802d402d73 Marco Elver 2025-12-19  82  static void __used test_raw_spinlock_trylock_extra(struct test_raw_spinlock_data *d)
f16a802d402d73 Marco Elver 2025-12-19  83  {
f16a802d402d73 Marco Elver 2025-12-19  84  	unsigned long flags;
f16a802d402d73 Marco Elver 2025-12-19  85  
f16a802d402d73 Marco Elver 2025-12-19  86  	if (raw_spin_trylock_irq(&d->lock)) {
f16a802d402d73 Marco Elver 2025-12-19  87  		d->counter++;
f16a802d402d73 Marco Elver 2025-12-19  88  		raw_spin_unlock_irq(&d->lock);
f16a802d402d73 Marco Elver 2025-12-19  89  	}
f16a802d402d73 Marco Elver 2025-12-19 @90  	if (raw_spin_trylock_irqsave(&d->lock, flags)) {
f16a802d402d73 Marco Elver 2025-12-19  91  		d->counter++;
f16a802d402d73 Marco Elver 2025-12-19  92  		raw_spin_unlock_irqrestore(&d->lock, flags);
f16a802d402d73 Marco Elver 2025-12-19  93  	}
f16a802d402d73 Marco Elver 2025-12-19  94  	scoped_cond_guard(raw_spinlock_try, return, &d->lock) {
f16a802d402d73 Marco Elver 2025-12-19  95  		d->counter++;
f16a802d402d73 Marco Elver 2025-12-19  96  	}
f16a802d402d73 Marco Elver 2025-12-19  97  }
f16a802d402d73 Marco Elver 2025-12-19  98  

--
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-06-12  2:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12  2:46 [tip:locking/core 11/43] lib/test_context-analysis.c:90 test_raw_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.