Skip to content

Commit b1fa39f

Browse files
Jiapeng Chonggregkh
authored andcommitted
hrtimer: Rename __hrtimer_hres_active() to hrtimer_hres_active()
[ Upstream commit b7c8e1f ] The function hrtimer_hres_active() are defined in the hrtimer.c file, but not called elsewhere, so rename __hrtimer_hres_active() to hrtimer_hres_active() and remove the old hrtimer_hres_active() function. kernel/time/hrtimer.c:653:19: warning: unused function 'hrtimer_hres_active'. Fixes: 82ccdf0 ("hrtimer: Remove unused function") Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Link: https://lore.kernel.org/r/20240418023000.130324-1-jiapeng.chong@linux.alibaba.com Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8778 Stable-dep-of: e895f8e ("hrtimers: Unconditionally update target CPU base after offline timer migration") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6276a6b commit b1fa39f

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

kernel/time/hrtimer.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -671,17 +671,12 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
671671
/*
672672
* Is the high resolution mode active ?
673673
*/
674-
static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
674+
static inline int hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
675675
{
676676
return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ?
677677
cpu_base->hres_active : 0;
678678
}
679679

680-
static inline int hrtimer_hres_active(void)
681-
{
682-
return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
683-
}
684-
685680
static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
686681
struct hrtimer *next_timer,
687682
ktime_t expires_next)
@@ -705,7 +700,7 @@ static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
705700
* set. So we'd effectively block all timers until the T2 event
706701
* fires.
707702
*/
708-
if (!__hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
703+
if (!hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
709704
return;
710705

711706
tick_program_event(expires_next, 1);
@@ -814,12 +809,12 @@ static void retrigger_next_event(void *arg)
814809
* function call will take care of the reprogramming in case the
815810
* CPU was in a NOHZ idle sleep.
816811
*/
817-
if (!__hrtimer_hres_active(base) && !tick_nohz_active)
812+
if (!hrtimer_hres_active(base) && !tick_nohz_active)
818813
return;
819814

820815
raw_spin_lock(&base->lock);
821816
hrtimer_update_base(base);
822-
if (__hrtimer_hres_active(base))
817+
if (hrtimer_hres_active(base))
823818
hrtimer_force_reprogram(base, 0);
824819
else
825820
hrtimer_update_next_event(base);
@@ -976,7 +971,7 @@ void clock_was_set(unsigned int bases)
976971
cpumask_var_t mask;
977972
int cpu;
978973

979-
if (!__hrtimer_hres_active(cpu_base) && !tick_nohz_active)
974+
if (!hrtimer_hres_active(cpu_base) && !tick_nohz_active)
980975
goto out_timerfd;
981976

982977
if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) {
@@ -1554,7 +1549,7 @@ u64 hrtimer_get_next_event(void)
15541549

15551550
raw_spin_lock_irqsave(&cpu_base->lock, flags);
15561551

1557-
if (!__hrtimer_hres_active(cpu_base))
1552+
if (!hrtimer_hres_active(cpu_base))
15581553
expires = __hrtimer_get_next_event(cpu_base, HRTIMER_ACTIVE_ALL);
15591554

15601555
raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
@@ -1577,7 +1572,7 @@ u64 hrtimer_next_event_without(const struct hrtimer *exclude)
15771572

15781573
raw_spin_lock_irqsave(&cpu_base->lock, flags);
15791574

1580-
if (__hrtimer_hres_active(cpu_base)) {
1575+
if (hrtimer_hres_active(cpu_base)) {
15811576
unsigned int active;
15821577

15831578
if (!cpu_base->softirq_activated) {
@@ -1949,7 +1944,7 @@ void hrtimer_run_queues(void)
19491944
unsigned long flags;
19501945
ktime_t now;
19511946

1952-
if (__hrtimer_hres_active(cpu_base))
1947+
if (hrtimer_hres_active(cpu_base))
19531948
return;
19541949

19551950
/*

0 commit comments

Comments
 (0)