Skip to contentSkip to conversation

hrtimer: Remove unused function hrtimer_hres_active

PATCH In review Jiapeng Chong 2 participants 2 messages Apr 17, 2024 High-resolution timers, timer wheel, clockevents

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hrtimer: Remove unused function hrtimer_hres_active

The function are defined in the hrtimer.c file, but not called elsewhere, so delete the unused function.

kernel/time/hrtimer.c:653:19: warning: unused function 'hrtimer_hres_active'.

---
 kernel/time/hrtimer.c | 5 -----
 1 file changed, 5 deletions(-)
kernel/time/hrtimer.c +0 -5
index cae9d04b5584..bdaf23356d4b 100644
@@ -650,11 +650,6 @@ static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
 		cpu_base->hres_active : 0;
 }
 
-static inline int hrtimer_hres_active(void)
-{
-	return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
-}
-
 static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
 				struct hrtimer *next_timer,
 				ktime_t expires_next)
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw
Quoted 18 lines · Jiapeng Chong

The function are defined in the hrtimer.c file, but not called elsewhere, so delete the unused function.

kernel/time/hrtimer.c:653:19: warning: unused function 'hrtimer_hres_active'.

---
 kernel/time/hrtimer.c | 5 -----
 1 file changed, 5 deletions(-)
kernel/time/hrtimer.c +0 -0
index cae9d04b5584..bdaf23356d4b 100644
@@ -650,11 +650,6 @@ static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
 		cpu_base->hres_active : 0;

kernel/time/hrtimer.c static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base) · line 655

Quoted 10 lines
kernel/time/hrtimer.c +0 -5
 }
 
-static inline int hrtimer_hres_active(void)
-{
-	return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
-}
-
 static void __hrtimer_reprogram(struct hrtimer_cpu_base *cpu_base,
 				struct hrtimer *next_timer,
 				ktime_t expires_next)

Can you please rename __hrtimer_hres_active() to hrtimer_hres_active() and remove the old hrtimer_hres_active() function?

Btw. you could add a

Fixes 82ccdf062a64 ("hrtimer: Remove unused function")

as the warning was introduced by removing the last (unused) callsite __hrtimer_peek_ahead_timers().

Thanks,

Anna-Maria