[tip: sched/core] sched/fair: Remove unused arguments from set_preempt_buddy()

From: tip-bot2 for K Prateek Nayak

Date: Tue Jun 30 2026 - 05:06:15 EST


The following commit has been merged into the sched/core branch of tip:

Commit-ID: 3cd1f657fae568904564b572e1a8e708e50c3b5e
Gitweb: https://git.kernel.org/tip/3cd1f657fae568904564b572e1a8e708e50c3b5e
Author: K Prateek Nayak <kprateek.nayak@xxxxxxx>
AuthorDate: Fri, 26 Jun 2026 08:56:14 +02:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 30 Jun 2026 10:56:54 +02:00

sched/fair: Remove unused arguments from set_preempt_buddy()

On a tangential note, I just noticed set_preempt_buddy() has two unused
parameters. Seems to have been like that since it was introduced in
commit e837456fdca8 ("sched/fair: Reimplement NEXT_BUDDY to align with
EEVDF goals").

Signed-off-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
kernel/sched/fair.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index cfaed2c..90d7f83 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9742,9 +9742,7 @@ enum preempt_wakeup_action {
PREEMPT_WAKEUP_RESCHED, /* Force reschedule. */
};

-static inline bool
-set_preempt_buddy(struct cfs_rq *cfs_rq, int wake_flags,
- struct sched_entity *pse, struct sched_entity *se)
+static inline bool set_preempt_buddy(struct cfs_rq *cfs_rq, struct sched_entity *pse)
{
/*
* Keep existing buddy if the deadline is sooner than pse.
@@ -9893,9 +9891,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f
return;

/* Prefer picking wakee soon if appropriate. */
- if (sched_feat(NEXT_BUDDY) &&
- set_preempt_buddy(cfs_rq, wake_flags, pse, se)) {
-
+ if (sched_feat(NEXT_BUDDY) && set_preempt_buddy(cfs_rq, pse)) {
/*
* Decide whether to obey WF_SYNC hint for a new buddy. Old
* buddies are ignored as they may not be relevant to the