diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-12-09 20:08:10 +0300 |
---|---|---|
committer | Boqun Feng <boqun.feng@gmail.com> | 2024-12-20 00:57:53 +0300 |
commit | 8148fa2e022bae29f21bb9a2c4cc796334fd372b (patch) | |
tree | 2eb64735cefd5b4a4eeb5aa352dd66cbc87fdf21 /rust/helpers/mutex.c | |
parent | bd7b5ae26618ad2bd6f6264e2cb6c5815d323e75 (diff) | |
download | linux-8148fa2e022bae29f21bb9a2c4cc796334fd372b.tar.xz |
lockdep: Mark chain_hlock_class_idx() with __maybe_unused
When chain_hlock_class_idx() is unused, it prevents kernel builds with
clang, `make W=1` and CONFIG_WERROR=y, CONFIG_LOCKDEP=y and
CONFIG_PROVE_LOCKING=n:
kernel/locking/lockdep.c:435:28: error: unused function 'chain_hlock_class_idx' [-Werror,-Wunused-function]
Fix this by marking it with __maybe_unused.
See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
inline functions for W=1 build").
[Boqun: add more config information of the error]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20241209170810.1485183-1-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions