[PATCH] sched/core: Fix stale function references in comments

Zhan Xusheng posted 1 patch 2 months ago
kernel/sched/core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
[PATCH] sched/core: Fix stale function references in comments
Posted by Zhan Xusheng 2 months ago
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.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 kernel/sched/core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 496dff740dca..5bc4e3897ade 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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)))
-- 
2.43.0