diff options
| author | Waiman Long <[email protected]> | 2024-09-09 18:29:05 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2024-09-10 10:02:33 +0000 |
| commit | d00b83d416e73bc3fa4d21b14bec920e88b70ce6 (patch) | |
| tree | 68909c23e7ef5f4e4f0dabb1a86c85a41271dbdc /drivers/pci/controller/dwc | |
| parent | locking/lockdep: Simplify character output in seq_line() (diff) | |
| download | kernel-d00b83d416e73bc3fa4d21b14bec920e88b70ce6.tar.gz kernel-d00b83d416e73bc3fa4d21b14bec920e88b70ce6.zip | |
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 <[email protected]>
Signed-off-by: Waiman Long <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/pci/controller/dwc')
0 files changed, 0 insertions, 0 deletions
