Skip to content

Commit 5acc7d8

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 f76b38f commit 5acc7d8

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
@@ -669,17 +669,12 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
669669
/*
670670
* Is the high resolution mode active ?
671671
*/
672-
static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
672+
static inline int hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
673673
{
674674
return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ?
675675
cpu_base->hres_active : 0;
676676
}
677677

678-
static inline int hrtimer_hres_active(void)
679-
{
680-
return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
681-
}
682-
683678
static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
684679
struct hrtimer *next_timer,
685680
ktime_t expires_next)
@@ -703,7 +698,7 @@ static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
703698
* set. So we'd effectively block all timers until the T2 event
704699
* fires.
705700
*/
706-
if (!__hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
701+
if (!hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
707702
return;
708703

709704
tick_program_event(expires_next, 1);
@@ -812,12 +807,12 @@ static void retrigger_next_event(void *arg)
812807
* function call will take care of the reprogramming in case the
813808
* CPU was in a NOHZ idle sleep.
814809
*/
815-
if (!__hrtimer_hres_active(base) && !tick_nohz_active)
810+
if (!hrtimer_hres_active(base) && !tick_nohz_active)
816811
return;
817812

818813
raw_spin_lock(&base->lock);
819814
hrtimer_update_base(base);
820-
if (__hrtimer_hres_active(base))
815+
if (hrtimer_hres_active(base))
821816
hrtimer_force_reprogram(base, 0);
822817
else
823818
hrtimer_update_next_event(base);
@@ -974,7 +969,7 @@ void clock_was_set(unsigned int bases)
974969
cpumask_var_t mask;
975970
int cpu;
976971

977-
if (!__hrtimer_hres_active(cpu_base) && !tick_nohz_active)
972+
if (!hrtimer_hres_active(cpu_base) && !tick_nohz_active)
978973
goto out_timerfd;
979974

980975
if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) {
@@ -1551,7 +1546,7 @@ u64 hrtimer_get_next_event(void)
15511546

15521547
raw_spin_lock_irqsave(&cpu_base->lock, flags);
15531548

1554-
if (!__hrtimer_hres_active(cpu_base))
1549+
if (!hrtimer_hres_active(cpu_base))
15551550
expires = __hrtimer_get_next_event(cpu_base, HRTIMER_ACTIVE_ALL);
15561551

15571552
raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
@@ -1574,7 +1569,7 @@ u64 hrtimer_next_event_without(const struct hrtimer *exclude)
15741569

15751570
raw_spin_lock_irqsave(&cpu_base->lock, flags);
15761571

1577-
if (__hrtimer_hres_active(cpu_base)) {
1572+
if (hrtimer_hres_active(cpu_base)) {
15781573
unsigned int active;
15791574

15801575
if (!cpu_base->softirq_activated) {
@@ -1946,7 +1941,7 @@ void hrtimer_run_queues(void)
19461941
unsigned long flags;
19471942
ktime_t now;
19481943

1949-
if (__hrtimer_hres_active(cpu_base))
1944+
if (hrtimer_hres_active(cpu_base))
19501945
return;
19511946

19521947
/*

0 commit comments

Comments
 (0)