]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched/fair: Mark m*_vruntime() with __maybe_unused
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Dec 2024 17:35:30 +0000 (19:35 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 9 Dec 2024 10:48:13 +0000 (11:48 +0100)
commit95d9fed3a2aea85fe9551c2f007e186d4abb4a2a
treed418cca6a2aca58db905e935810a988993161f4a
parent0429489e092851f066b08deed9ce0f3910515383
sched/fair: Mark m*_vruntime() with __maybe_unused

When max_vruntime() is unused, it prevents kernel builds with clang,
`make W=1` and CONFIG_WERROR=y:

kernel/sched/fair.c:526:19: error: unused function 'max_vruntime' [-Werror,-Wunused-function]
  526 | static inline u64 max_vruntime(u64 max_vruntime, u64 vruntime)
      |                   ^~~~~~~~~~~~

Fix this by marking them with __maybe_unused (all cases for the sake of
symmetry).

See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
inline functions for W=1 build").

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20241202173546.634433-1-andriy.shevchenko@linux.intel.com
kernel/sched/fair.c