Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched: Clean up and standardize #if/#else/#endif markers in sched/stats.[ch]

- Use the standard #ifdef marker format for larger blocks,
where appropriate:

#if CONFIG_FOO
...
#else /* !CONFIG_FOO: */
...
#endif /* !CONFIG_FOO */

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20250528080924.2273858-17-mingo@kernel.org

+6 -6
+1 -1
kernel/sched/stats.c
··· 164 164 sd->ttwu_move_balance); 165 165 } 166 166 rcu_read_unlock(); 167 - #endif 167 + #endif /* CONFIG_SMP */ 168 168 } 169 169 return 0; 170 170 }
+5 -5
kernel/sched/stats.h
··· 112 112 bool sleep); 113 113 #ifdef CONFIG_IRQ_TIME_ACCOUNTING 114 114 void psi_account_irqtime(struct rq *rq, struct task_struct *curr, struct task_struct *prev); 115 - #else 115 + #else /* !CONFIG_IRQ_TIME_ACCOUNTING: */ 116 116 static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr, 117 117 struct task_struct *prev) {} 118 - #endif /*CONFIG_IRQ_TIME_ACCOUNTING */ 118 + #endif /* !CONFIG_IRQ_TIME_ACCOUNTING */ 119 119 /* 120 120 * PSI tracks state that persists across sleeps, such as iowaits and 121 121 * memory stalls. As a result, it has to distinguish between sleeps, ··· 220 220 psi_task_switch(prev, next, sleep); 221 221 } 222 222 223 - #else /* CONFIG_PSI */ 223 + #else /* !CONFIG_PSI: */ 224 224 static inline void psi_enqueue(struct task_struct *p, bool migrate) {} 225 225 static inline void psi_dequeue(struct task_struct *p, bool migrate) {} 226 226 static inline void psi_ttwu_dequeue(struct task_struct *p) {} ··· 229 229 bool sleep) {} 230 230 static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr, 231 231 struct task_struct *prev) {} 232 - #endif /* CONFIG_PSI */ 232 + #endif /* !CONFIG_PSI */ 233 233 234 234 #ifdef CONFIG_SCHED_INFO 235 235 /* ··· 334 334 # define sched_info_enqueue(rq, t) do { } while (0) 335 335 # define sched_info_dequeue(rq, t) do { } while (0) 336 336 # define sched_info_switch(rq, t, next) do { } while (0) 337 - #endif /* CONFIG_SCHED_INFO */ 337 + #endif /* !CONFIG_SCHED_INFO */ 338 338 339 339 #endif /* _KERNEL_STATS_H */