Skip to contentSkip to conversation

sched/psi: Fix !CONFIG_PSI stub parameter types for psi_enqueue/dequeue()

PATCH New Zhan Xusheng 1 participant 1 message Jun 24 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 sched/psi: Fix !CONFIG_PSI stub parameter types for psi_enqueue/dequeue()

commit 1a6151017ee5 ("sched: psi: pass enqueue/dequeue flags to psi callbacks directly") changed psi_enqueue() and psi_dequeue() to take 'int flags' instead of 'bool migrate', but missed updating the !CONFIG_PSI stubs in kernel/sched/stats.h, which still take 'bool migrate'.

Keep the stub prototypes in sync with the real functions so both build variants share the same signature. No functional change.

Fixes 1a6151017ee5 ("sched: psi: pass enqueue/dequeue flags to psi callbacks directly")

---
v3:
- Reword the changelog: state the consistency rationale and use "No functional change" instead of "silent and harmless in practice"
- No code change vs v2 (one-line stub signature fix)
v2: https://lore.kernel.org/all/[email protected]/

 kernel/sched/stats.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/stats.h +2 -2
index ebe0a7765f98..cadffacf920c 100644
@@ -219,8 +219,8 @@ static inline void psi_sched_switch(struct task_struct *prev,
 }
 
 #else /* !CONFIG_PSI: */
-static inline void psi_enqueue(struct task_struct *p, bool migrate) {}
-static inline void psi_dequeue(struct task_struct *p, bool migrate) {}
+static inline void psi_enqueue(struct task_struct *p, int flags) {}
+static inline void psi_dequeue(struct task_struct *p, int flags) {}
 static inline void psi_ttwu_dequeue(struct task_struct *p) {}
 static inline void psi_sched_switch(struct task_struct *prev,
 				    struct task_struct *next,
Signature · 1 line
2.43.0