]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hrtimers: Mark is_migration_base() with __always_inline
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 16 Jan 2025 16:07:45 +0000 (18:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:14 +0000 (12:54 -0700)
commitae5716b4631fa5a8fce6173e0d81ba9fa1cf9a38
treebae20c270d5e544f45f972c0298779d00b2cc3d2
parent18bee525aa9ad68cea6ae3cad29aa8d99048a0f7
hrtimers: Mark is_migration_base() with __always_inline

[ Upstream commit 27af31e44949fa85550176520ef7086a0d00fd7b ]

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

kernel/time/hrtimer.c:156:20: error: unused function 'is_migration_base' [-Werror,-Wunused-function]
  156 | static inline bool is_migration_base(struct hrtimer_clock_base *base)
      |                    ^~~~~~~~~~~~~~~~~

Fix this by marking it with __always_inline.

[ tglx: Use __always_inline instead of __maybe_unused and move it into the
   usage sites conditional ]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250116160745.243358-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/time/hrtimer.c