[PATCH] clocksource/drivers/arm_arch_timer: Make the read_sched_clock_is_arch_counter() stub inline
From: Sasha Levin
Date: Sun Nov 29 2026 - 20:29:34 EST
The !CONFIG_ARM_ARCH_TIMER stub of read_sched_clock_is_arch_counter() is
a plain static function in a header. A file that includes
<clocksource/arm_arch_timer.h> without the arch timer enabled and does
not call it gets an unused function, which breaks x86_64 allmodconfig
(COMPILE_TEST builds of rpmh-rsc.c and qcom_stats.c with CONFIG_WERROR):
In file included from drivers/soc/qcom/rpmh-rsc.c:30:
include/clocksource/arm_arch_timer.h:113:13: error: 'read_sched_clock_is_arch_counter' defined but not used [-Werror=unused-function]
Make the stub static inline, like the other stubs around it.
Fixes: 71c11e8be95d ("clocksource/drivers/arm_arch_timer: Add read_sched_clock_is_arch_counter() predicate")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/20261127235920.1xBAAn8s-lkp@xxxxxxxxx/
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Built drivers/soc/qcom/rpmh-rsc.o and qcom_stats.o with x86_64 allmodconfig
(gcc 16) on top of arm64 for-next/perf: both fail before, both build after.
include/clocksource/arm_arch_timer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h
index 84cdbaffcfb5e..f74e0d4d913e4 100644
--- a/include/clocksource/arm_arch_timer.h
+++ b/include/clocksource/arm_arch_timer.h
@@ -110,7 +110,7 @@ static inline bool arch_timer_evtstrm_available(void)
return false;
}
-static bool read_sched_clock_is_arch_counter(const struct clock_read_data *crd)
+static inline bool read_sched_clock_is_arch_counter(const struct clock_read_data *crd)
{
return false;
}
base-commit: caee2c799f896b49f5247db3b2c4bf3926b0738a
--
2.53.0