linux/kernel/locking
Waiman Long d00b83d416 locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
Both is_rwsem_reader_owned() and rwsem_owner() are currently only used when
CONFIG_DEBUG_RWSEMS is defined. This causes a compilation error with clang
when `make W=1` and CONFIG_WERROR=y:

kernel/locking/rwsem.c:187:20: error: unused function 'is_rwsem_reader_owned' [-Werror,-Wunused-function]
  187 | static inline bool is_rwsem_reader_owned(struct rw_semaphore *sem)
      |                    ^~~~~~~~~~~~~~~~~~~~~
kernel/locking/rwsem.c:271:35: error: unused function 'rwsem_owner' [-Werror,-Wunused-function]
  271 | static inline struct task_struct *rwsem_owner(struct rw_semaphore *sem)
      |                                   ^~~~~~~~~~~

Fix this by moving these two functions under the CONFIG_DEBUG_RWSEMS define.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240909182905.161156-1-longman@redhat.com
2024-09-10 12:02:33 +02:00
..
irqflag-debug.c
lock_events_list.h
lock_events.c locking/debug: Fix debugfs API return value checks to use IS_ERR() 2023-10-03 10:11:25 +02:00
lock_events.h locking/qspinlock: Always evaluate lockevent* non-event parameter once 2024-03-21 20:45:17 +01:00
lockdep_internals.h locking/lockdep: Iterate lock_classes directly when reading lockdep files 2022-02-16 15:57:58 +01:00
lockdep_proc.c locking/lockdep: Simplify character output in seq_line() 2024-08-06 10:46:43 -07:00
lockdep_states.h
lockdep.c lockdep: fix deadlock issue between lockdep and rcu 2024-08-06 10:46:42 -07:00
locktorture.c locktorture: Add MODULE_DESCRIPTION() 2024-05-30 15:31:45 -07:00
Makefile lockdep: allow instrumenting lockdep.c with KMSAN 2022-12-11 18:12:11 -08:00
mcs_spinlock.h
mutex-debug.c locking/mutex: Introduce devm_mutex_init() 2024-04-11 17:34:41 +01:00
mutex.c locking/mutex: Document that mutex_unlock() is non-atomic 2023-12-01 11:27:43 +01:00
mutex.h
osq_lock.c locking/osq_lock: Clarify osq_wait_next() 2023-12-30 10:25:51 -08:00
percpu-rwsem.c locking/percpu-rwsem: Trigger contention tracepoints only if contended 2024-02-28 13:10:29 +01:00
qrwlock.c locking: Add __lockfunc to slow path functions 2022-08-19 19:47:51 +02:00
qspinlock_paravirt.h locking/pvqspinlock: Use try_cmpxchg() in qspinlock_paravirt.h 2024-04-12 11:42:39 +02:00
qspinlock_stat.h
qspinlock.c x86/xen: remove deprecated xen_nopvspin boot parameter 2024-07-11 16:33:51 +02:00
rtmutex_api.c locking/rtmutex: Fix task->pi_waiters integrity 2023-07-17 13:59:10 +02:00
rtmutex_common.h locking/rtmutex: Fix task->pi_waiters integrity 2023-07-17 13:59:10 +02:00
rtmutex.c locking/rtmutex: Use try_cmpxchg_relaxed() in mark_rt_mutex_waiters() 2024-03-01 13:02:05 +01:00
rwbase_rt.c locking/rtmutex: Add a lockdep assert to catch potential nested blocking 2023-09-20 09:31:14 +02:00
rwsem.c locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS 2024-09-10 12:02:33 +02:00
semaphore.c locking: Add __sched to semaphore functions 2022-09-15 16:14:03 +02:00
spinlock_debug.c sched.h: move pid helpers to pid.h 2023-12-20 19:26:31 -05:00
spinlock_rt.c locking/rtmutex: Add a lockdep assert to catch potential nested blocking 2023-09-20 09:31:14 +02:00
spinlock.c locking/local_lock: Add local nested BH locking infrastructure. 2024-06-24 16:41:22 -07:00
test-ww_mutex.c locking/ww_mutex/test: Make sure we bail out instead of livelock 2023-09-22 09:43:41 +02:00
ww_mutex.h locking/rtmutex: Fix task->pi_waiters integrity 2023-07-17 13:59:10 +02:00
ww_rt_mutex.c locking/rtmutex: Avoid unconditional slowpath for DEBUG_RT_MUTEXES 2023-09-20 09:31:11 +02:00