From: Ingo Molnar Date: Mon, 2 Mar 2026 11:26:12 +0000 (+0000) Subject: sched/hrtick: Mark hrtick_clear() as always used X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef9f648fb0e92618041f019d4bdcf7ae17cb743;p=thirdparty%2Fkernel%2Flinux.git sched/hrtick: Mark hrtick_clear() as always used This recent commit: 96d1610e0b20b ("sched: Optimize hrtimer handling") introduced a new build warning when !CONFIG_HOTPLUG_CPU while SCHED_HRTIMERS=y [ == HIGH_RES_TIMERS=y ]: /tip.testing/kernel/sched/core.c:882:13: warning: ‘hrtick_clear’ defined but not used [-Wunused-function] Mark this helper function as always-used, instead of complicating the code with another obscure #ifdef. Fixes: 96d1610e0b20b ("sched: Optimize hrtimer handling") Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Cc: Thomas Gleixner Link: https://patch.msgid.link/177245077226.1647592.1821545206171336606.tip-bot2@tip-bot2 --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 49a64b4117a13..a4e7698e69383 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -879,7 +879,7 @@ enum { HRTICK_SCHED_REARM_HRTIMER = BIT(3) }; -static void hrtick_clear(struct rq *rq) +static void __used hrtick_clear(struct rq *rq) { if (hrtimer_active(&rq->hrtick_timer)) hrtimer_cancel(&rq->hrtick_timer);