Skip to contentSkip to conversation

sched_ext: Remove a meaningless conditional goto in scx_select_cpu_dfl()

PATCH In review Tejun Heo 2 participants 2 messages Mar 26, 2025 Scheduler

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 sched_ext: Remove a meaningless conditional goto in scx_select_cpu_dfl()

scx_select_cpu_dfl() has a meaningless conditional goto at the end. Remove it. No functional changes.

Cc Andrea Righi <[email protected]>

---
Applied to sched_ext/for-6.15-fixes. Thanks.

 kernel/sched/ext_idle.c | 2 --
 1 file changed, 2 deletions(-)
kernel/sched/ext_idle.c +0 -2
index 45061b584380..b5f451e616d4 100644
@@ -584,8 +584,6 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags, u64
 	 * increasing distance.
 	 */
 	cpu = scx_pick_idle_cpu(p->cpus_ptr, node, flags);
-	if (cpu >= 0)
-		goto out_unlock;
 
 out_unlock:
 	rcu_read_unlock();
Signature · 1 line
2.48.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Tejun Heo

scx_select_cpu_dfl() has a meaningless conditional goto at the end. Remove it. No functional changes.

Cc Andrea Righi <[email protected]>

Looks good, thanks!

-Andrea

Quoted 22 lines

---
Applied to sched_ext/for-6.15-fixes. Thanks.

 kernel/sched/ext_idle.c | 2 --
 1 file changed, 2 deletions(-)
kernel/sched/ext_idle.c +0 -2
index 45061b584380..b5f451e616d4 100644
@@ -584,8 +584,6 @@ s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags, u64
 	 * increasing distance.
 	 */
 	cpu = scx_pick_idle_cpu(p->cpus_ptr, node, flags);
-	if (cpu >= 0)
-		goto out_unlock;
 
 out_unlock:
 	rcu_read_unlock();
Signature · 1 line
2.48.1