Skip to contentSkip to conversation

sched/core: Fix stale function references in comments

PATCH New Zhan Xusheng 1 participant 1 message Apr 13 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/core: Fix stale function references in comments

Fix two stale function/callback name references in comments:

1. Remove a stale comment referencing sched_rt_avg_update(), which was removed in commit bbb62c0b024a ("sched/core: Remove the rt_avg code"). The comment about compiler optimization of this non-existent function is no longer relevant.

2. The sched_class callback ->select_task() was renamed to ->select_task_rq() long ago. Update the comment to match.

---
 kernel/sched/core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
kernel/sched/core.c +1 -5
index 496dff740dca..5bc4e3897ade 100644
@@ -785,10 +785,6 @@ struct static_key paravirt_steal_rq_enabled;
 
 static void update_rq_clock_task(struct rq *rq, s64 delta)
 {
-/*
- * In theory, the compile should just see 0 here, and optimize out the call
- * to sched_rt_avg_update. But I don't trust it...
- */
 	s64 __maybe_unused steal = 0, irq_delta = 0;
 
 #ifdef CONFIG_IRQ_TIME_ACCOUNTING
@@ -3531,7 +3527,7 @@ int select_task_rq(struct task_struct *p, int cpu, int *wake_flags)
 	 *
 	 * Since this is common to all placement strategies, this lives here.
 	 *
-	 * [ this allows ->select_task() to simply return task_cpu(p) and
+	 * [ this allows ->select_task_rq() to simply return task_cpu(p) and
 	 *   not worry about this generic constraint ]
 	 */
 	if (unlikely(!is_cpu_allowed(p, cpu)))
Signature · 1 line
2.43.0