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/cputime.c

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

+7 -7
+7 -7
kernel/sched/cputime.c
··· 91 91 return delta; 92 92 } 93 93 94 - #else /* CONFIG_IRQ_TIME_ACCOUNTING */ 94 + #else /* !CONFIG_IRQ_TIME_ACCOUNTING: */ 95 95 96 96 static u64 irqtime_tick_accounted(u64 dummy) 97 97 { ··· 244 244 245 245 task_group_account_field(p, CPUTIME_FORCEIDLE, delta); 246 246 } 247 - #endif 247 + #endif /* CONFIG_SCHED_CORE */ 248 248 249 249 /* 250 250 * When a guest is interrupted for a longer amount of time, missed clock ··· 265 265 266 266 return steal; 267 267 } 268 - #endif 268 + #endif /* CONFIG_PARAVIRT */ 269 269 return 0; 270 270 } 271 271 ··· 291 291 { 292 292 return t->se.sum_exec_runtime; 293 293 } 294 - #else 294 + #else /* !CONFIG_64BIT: */ 295 295 static u64 read_sum_exec_runtime(struct task_struct *t) 296 296 { 297 297 u64 ns; ··· 304 304 305 305 return ns; 306 306 } 307 - #endif 307 + #endif /* !CONFIG_64BIT */ 308 308 309 309 /* 310 310 * Accumulate raw cputime values of dead tasks (sig->[us]time) and live ··· 414 414 { 415 415 irqtime_account_process_tick(current, 0, ticks); 416 416 } 417 - #else /* CONFIG_IRQ_TIME_ACCOUNTING */ 417 + #else /* !CONFIG_IRQ_TIME_ACCOUNTING: */ 418 418 static inline void irqtime_account_idle_ticks(int ticks) { } 419 419 static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick, 420 420 int nr_ticks) { } 421 - #endif /* CONFIG_IRQ_TIME_ACCOUNTING */ 421 + #endif /* !CONFIG_IRQ_TIME_ACCOUNTING */ 422 422 423 423 /* 424 424 * Use precise platform statistics if available: