From: Ingo Molnar Date: Wed, 28 May 2025 08:09:17 +0000 (+0200) Subject: sched/smp: Use the SMP version of cpu_of() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=172408811961d7facbd1ec9af66893b058d5d542;p=thirdparty%2Fkernel%2Flinux.git sched/smp: Use the SMP version of cpu_of() Simplify the scheduler by making CONFIG_SMP=y code in cpu_of() unconditional. Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Sebastian Andrzej Siewior Cc: Shrikanth Hegde Cc: Steven Rostedt Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lore.kernel.org/r/20250528080924.2273858-37-mingo@kernel.org --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 6bc8e426f1741..234dd28e2bec6 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1294,11 +1294,7 @@ static inline struct rq *rq_of(struct cfs_rq *cfs_rq) static inline int cpu_of(struct rq *rq) { -#ifdef CONFIG_SMP return rq->cpu; -#else - return 0; -#endif } #define MDF_PUSH 0x01