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/pelt.[ch]

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

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

- Fix whitespace noise and other inconsistencies.

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-13-mingo@kernel.org

+8 -8
+2 -2
kernel/sched/pelt.c
··· 414 414 415 415 return 0; 416 416 } 417 - #endif 417 + #endif /* CONFIG_SCHED_HW_PRESSURE */ 418 418 419 419 #ifdef CONFIG_HAVE_SCHED_AVG_IRQ 420 420 /* ··· 467 467 468 468 return ret; 469 469 } 470 - #endif 470 + #endif /* CONFIG_HAVE_SCHED_AVG_IRQ */ 471 471 472 472 /* 473 473 * Load avg and utiliztion metrics need to be updated periodically and before
+6 -6
kernel/sched/pelt.h
··· 20 20 { 21 21 return READ_ONCE(rq->avg_hw.load_avg); 22 22 } 23 - #else 23 + #else /* !CONFIG_SCHED_HW_PRESSURE: */ 24 24 static inline int 25 25 update_hw_load_avg(u64 now, struct rq *rq, u64 capacity) 26 26 { ··· 31 31 { 32 32 return 0; 33 33 } 34 - #endif 34 + #endif /* !CONFIG_SCHED_HW_PRESSURE */ 35 35 36 36 #ifdef CONFIG_HAVE_SCHED_AVG_IRQ 37 37 int update_irq_load_avg(struct rq *rq, u64 running); ··· 179 179 180 180 return rq_clock_pelt(rq_of(cfs_rq)) - cfs_rq->throttled_clock_pelt_time; 181 181 } 182 - #else 182 + #else /* !CONFIG_CFS_BANDWIDTH: */ 183 183 static inline void update_idle_cfs_rq_clock_pelt(struct cfs_rq *cfs_rq) { } 184 184 static inline u64 cfs_rq_clock_pelt(struct cfs_rq *cfs_rq) 185 185 { 186 186 return rq_clock_pelt(rq_of(cfs_rq)); 187 187 } 188 - #endif 188 + #endif /* !CONFIG_CFS_BANDWIDTH */ 189 189 190 - #else 190 + #else /* !CONFIG_SMP: */ 191 191 192 192 static inline int 193 193 update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) ··· 236 236 update_idle_rq_clock_pelt(struct rq *rq) { } 237 237 238 238 static inline void update_idle_cfs_rq_clock_pelt(struct cfs_rq *cfs_rq) { } 239 - #endif 239 + #endif /* !CONFIG_SMP */ 240 240 241 241 #endif /* _KERNEL_SCHED_PELT_H */