Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit b7c8e1f

Browse files
Jiapeng ChongKAGA-KOKO
authored andcommitted
hrtimer: Rename __hrtimer_hres_active() to hrtimer_hres_active()
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
1 parent e84c600 commit b7c8e1f

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
@@ -644,17 +644,12 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
644644
/*
645645
* Is the high resolution mode active ?
646646
*/
647-
static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
647+
static inline int hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
648648
{
649649
return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ?
650650
cpu_base->hres_active : 0;
651651
}
652652

653-
static inline int hrtimer_hres_active(void)
654-
{
655-
return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
656-
}
657-
658653
static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
659654
struct hrtimer *next_timer,
660655
ktime_t expires_next)
@@ -678,7 +673,7 @@ static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
678673
* set. So we'd effectively block all timers until the T2 event
679674
* fires.
680675
*/
681-
if (!__hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
676+
if (!hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
682677
return;
683678

684679
tick_program_event(expires_next, 1);
@@ -789,12 +784,12 @@ static void retrigger_next_event(void *arg)
789784
* function call will take care of the reprogramming in case the
790785
* CPU was in a NOHZ idle sleep.
791786
*/
792-
if (!__hrtimer_hres_active(base) && !tick_nohz_active)
787+
if (!hrtimer_hres_active(base) && !tick_nohz_active)
793788
return;
794789

795790
raw_spin_lock(&base->lock);
796791
hrtimer_update_base(base);
797-
if (__hrtimer_hres_active(base))
792+
if (hrtimer_hres_active(base))
798793
hrtimer_force_reprogram(base, 0);
799794
else
800795
hrtimer_update_next_event(base);
@@ -951,7 +946,7 @@ void clock_was_set(unsigned int bases)
951946
cpumask_var_t mask;
952947
int cpu;
953948

954-
if (!__hrtimer_hres_active(cpu_base) && !tick_nohz_active)
949+
if (!hrtimer_hres_active(cpu_base) && !tick_nohz_active)
955950
goto out_timerfd;
956951

957952
if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) {
@@ -1491,7 +1486,7 @@ u64 hrtimer_get_next_event(void)
14911486

14921487
raw_spin_lock_irqsave(&cpu_base->lock, flags);
14931488

1494-
if (!__hrtimer_hres_active(cpu_base))
1489+
if (!hrtimer_hres_active(cpu_base))
14951490
expires = __hrtimer_get_next_event(cpu_base, HRTIMER_ACTIVE_ALL);
14961491

14971492
raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
@@ -1514,7 +1509,7 @@ u64 hrtimer_next_event_without(const struct hrtimer *exclude)
15141509

15151510
raw_spin_lock_irqsave(&cpu_base->lock, flags);
15161511

1517-
if (__hrtimer_hres_active(cpu_base)) {
1512+
if (hrtimer_hres_active(cpu_base)) {
15181513
unsigned int active;
15191514

15201515
if (!cpu_base->softirq_activated) {
@@ -1886,7 +1881,7 @@ void hrtimer_run_queues(void)
18861881
unsigned long flags;
18871882
ktime_t now;
18881883

1889-
if (__hrtimer_hres_active(cpu_base))
1884+
if (hrtimer_hres_active(cpu_base))
18901885
return;
18911886

18921887
/*

0 commit comments

Comments
 (0)