mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] clocksource/drivers/arm_arch_timer: Make the read_sched_clock_is_arch_counter() stub inline
Date: Sun, 29 Nov 2026 20:29:25 -0500	[thread overview]
Message-ID: <20261130012925.921019-1-sashal@kernel.org> (raw)

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


                 reply	other threads:[~2026-11-30  1:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130012925.921019-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=tglx@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®