Skip to content

Commit 289dafe

Browse files
Frederic WeisbeckerKAGA-KOKO
authored andcommitted
timers/nohz: Remove middle-function __tick_nohz_idle_stop_tick()
There is no need for the __tick_nohz_idle_stop_tick() function between tick_nohz_idle_stop_tick() and its implementation. Remove that unnecessary step. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20230222144649.624380-6-frederic@kernel.org
1 parent ead70b7 commit 289dafe

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

kernel/time/tick-sched.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,10 +1079,16 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
10791079
return true;
10801080
}
10811081

1082-
static void __tick_nohz_idle_stop_tick(struct tick_sched *ts)
1082+
/**
1083+
* tick_nohz_idle_stop_tick - stop the idle tick from the idle task
1084+
*
1085+
* When the next event is more than a tick into the future, stop the idle tick
1086+
*/
1087+
void tick_nohz_idle_stop_tick(void)
10831088
{
1084-
ktime_t expires;
1089+
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
10851090
int cpu = smp_processor_id();
1091+
ktime_t expires;
10861092

10871093
/*
10881094
* If tick_nohz_get_sleep_length() ran tick_nohz_next_event(), the
@@ -1114,16 +1120,6 @@ static void __tick_nohz_idle_stop_tick(struct tick_sched *ts)
11141120
}
11151121
}
11161122

1117-
/**
1118-
* tick_nohz_idle_stop_tick - stop the idle tick from the idle task
1119-
*
1120-
* When the next event is more than a tick into the future, stop the idle tick
1121-
*/
1122-
void tick_nohz_idle_stop_tick(void)
1123-
{
1124-
__tick_nohz_idle_stop_tick(this_cpu_ptr(&tick_cpu_sched));
1125-
}
1126-
11271123
void tick_nohz_idle_retain_tick(void)
11281124
{
11291125
tick_nohz_retain_tick(this_cpu_ptr(&tick_cpu_sched));

0 commit comments

Comments
 (0)