* [melver:cap-analysis/dev 23/35] lib/test_capability-analysis.c:125 test_spinlock_trylock_extra() error: uninitialized symbol 'flags'.
@ 2025-09-24 3:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-09-24 3:52 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: elver@google.com
tree: https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git cap-analysis/dev
head: b57fd8af63116c56536eb40f04dbe4f2206ec4ed
commit: 32b884d94862a5295719faf9e1c3b5eef162cca4 [23/35] compiler-capability-analysis: Remove __cond_lock() function-like helper
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: sparc64-randconfig-r072-20250922 (https://download.01.org/0day-ci/archive/20250924/202509241125.8lkyg6o7-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.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: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202509241125.8lkyg6o7-lkp@intel.com/
New smatch warnings:
lib/test_capability-analysis.c:125 test_spinlock_trylock_extra() error: uninitialized symbol 'flags'.
Old smatch warnings:
lib/test_capability-analysis.c:101 test_raw_spinlock_trylock_extra() warn: mixing irq and irqsave
include/linux/spinlock.h:542 class_raw_spinlock_try_constructor() warn: passing zero to 'ERR_PTR'
lib/test_capability-analysis.c:125 test_spinlock_trylock_extra() warn: mixing irq and irqsave
include/linux/spinlock.h:581 class_spinlock_try_constructor() warn: passing zero to 'ERR_PTR'
include/linux/mutex.h:230 class_mutex_try_constructor() warn: passing zero to 'ERR_PTR'
include/linux/rwsem.h:262 class_rwsem_read_try_constructor() warn: passing zero to 'ERR_PTR'
include/linux/rwsem.h:270 class_rwsem_write_try_constructor() warn: passing zero to 'ERR_PTR'
vim +/flags +125 lib/test_capability-analysis.c
821a2ecb55c76ae Marco Elver 2025-01-23 107
821a2ecb55c76ae Marco Elver 2025-01-23 108 TEST_SPINLOCK_COMMON(spinlock,
821a2ecb55c76ae Marco Elver 2025-01-23 109 spinlock_t,
821a2ecb55c76ae Marco Elver 2025-01-23 110 spin_lock_init,
821a2ecb55c76ae Marco Elver 2025-01-23 111 spin_lock,
821a2ecb55c76ae Marco Elver 2025-01-23 112 spin_unlock,
821a2ecb55c76ae Marco Elver 2025-01-23 113 spin_trylock,
821a2ecb55c76ae Marco Elver 2025-01-23 114 TEST_OP_RW);
821a2ecb55c76ae Marco Elver 2025-01-23 115 static void __used test_spinlock_trylock_extra(struct test_spinlock_data *d)
821a2ecb55c76ae Marco Elver 2025-01-23 116 {
821a2ecb55c76ae Marco Elver 2025-01-23 117 unsigned long flags;
821a2ecb55c76ae Marco Elver 2025-01-23 118
821a2ecb55c76ae Marco Elver 2025-01-23 119 if (spin_trylock_irq(&d->lock)) {
821a2ecb55c76ae Marco Elver 2025-01-23 120 d->counter++;
821a2ecb55c76ae Marco Elver 2025-01-23 121 spin_unlock_irq(&d->lock);
821a2ecb55c76ae Marco Elver 2025-01-23 122 }
821a2ecb55c76ae Marco Elver 2025-01-23 123 if (spin_trylock_irqsave(&d->lock, flags)) {
821a2ecb55c76ae Marco Elver 2025-01-23 124 d->counter++;
821a2ecb55c76ae Marco Elver 2025-01-23 @125 spin_unlock_irqrestore(&d->lock, flags);
821a2ecb55c76ae Marco Elver 2025-01-23 126 }
821a2ecb55c76ae Marco Elver 2025-01-23 127 scoped_cond_guard(spinlock_try, return, &d->lock) {
821a2ecb55c76ae Marco Elver 2025-01-23 128 d->counter++;
821a2ecb55c76ae Marco Elver 2025-01-23 129 }
821a2ecb55c76ae Marco Elver 2025-01-23 130 }
821a2ecb55c76ae Marco Elver 2025-01-23 131
:::::: The code at line 125 was first introduced by commit
:::::: 821a2ecb55c76aebb2a5fc53c7a49c2bc21a59af locking/rwlock, spinlock: Support Clang's capability analysis
:::::: TO: Marco Elver <elver@google.com>
:::::: CC: Marco Elver <elver@google.com>
--
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:[~2025-09-24 3:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 3:52 [melver:cap-analysis/dev 23/35] lib/test_capability-analysis.c:125 test_spinlock_trylock_extra() error: uninitialized symbol 'flags' 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.