mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/arm_arch_timer: Make the read_sched_clock_is_arch_counter() stub inline
@ 2026-11-30  1:29 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2026-11-30  1:29 UTC (permalink / raw)
  To: Will Deacon, Marc Zyngier
  Cc: Catalin Marinas, Mark Rutland, Daniel Lezcano, Thomas Gleixner,
	linux-arm-kernel, linux-kernel

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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/20261127235920.1xBAAn8s-lkp@intel.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30  1:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30  1:29 [PATCH] clocksource/drivers/arm_arch_timer: Make the read_sched_clock_is_arch_counter() stub inline Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®