mirror of https://github.com/torvalds/linux.git
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
This commit is contained in:
parent
79af17344c
commit
4aec8669ff
|
|
@ -91,7 +91,7 @@ static u64 irqtime_tick_accounted(u64 maxtime)
|
||||||
return delta;
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_IRQ_TIME_ACCOUNTING */
|
#else /* !CONFIG_IRQ_TIME_ACCOUNTING: */
|
||||||
|
|
||||||
static u64 irqtime_tick_accounted(u64 dummy)
|
static u64 irqtime_tick_accounted(u64 dummy)
|
||||||
{
|
{
|
||||||
|
|
@ -244,7 +244,7 @@ void __account_forceidle_time(struct task_struct *p, u64 delta)
|
||||||
|
|
||||||
task_group_account_field(p, CPUTIME_FORCEIDLE, delta);
|
task_group_account_field(p, CPUTIME_FORCEIDLE, delta);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SCHED_CORE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When a guest is interrupted for a longer amount of time, missed clock
|
* When a guest is interrupted for a longer amount of time, missed clock
|
||||||
|
|
@ -265,7 +265,7 @@ static __always_inline u64 steal_account_process_time(u64 maxtime)
|
||||||
|
|
||||||
return steal;
|
return steal;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_PARAVIRT */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,7 +291,7 @@ static inline u64 read_sum_exec_runtime(struct task_struct *t)
|
||||||
{
|
{
|
||||||
return t->se.sum_exec_runtime;
|
return t->se.sum_exec_runtime;
|
||||||
}
|
}
|
||||||
#else
|
#else /* !CONFIG_64BIT: */
|
||||||
static u64 read_sum_exec_runtime(struct task_struct *t)
|
static u64 read_sum_exec_runtime(struct task_struct *t)
|
||||||
{
|
{
|
||||||
u64 ns;
|
u64 ns;
|
||||||
|
|
@ -304,7 +304,7 @@ static u64 read_sum_exec_runtime(struct task_struct *t)
|
||||||
|
|
||||||
return ns;
|
return ns;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !CONFIG_64BIT */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Accumulate raw cputime values of dead tasks (sig->[us]time) and live
|
* Accumulate raw cputime values of dead tasks (sig->[us]time) and live
|
||||||
|
|
@ -414,11 +414,11 @@ static void irqtime_account_idle_ticks(int ticks)
|
||||||
{
|
{
|
||||||
irqtime_account_process_tick(current, 0, ticks);
|
irqtime_account_process_tick(current, 0, ticks);
|
||||||
}
|
}
|
||||||
#else /* CONFIG_IRQ_TIME_ACCOUNTING */
|
#else /* !CONFIG_IRQ_TIME_ACCOUNTING: */
|
||||||
static inline void irqtime_account_idle_ticks(int ticks) { }
|
static inline void irqtime_account_idle_ticks(int ticks) { }
|
||||||
static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick,
|
static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick,
|
||||||
int nr_ticks) { }
|
int nr_ticks) { }
|
||||||
#endif /* CONFIG_IRQ_TIME_ACCOUNTING */
|
#endif /* !CONFIG_IRQ_TIME_ACCOUNTING */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use precise platform statistics if available:
|
* Use precise platform statistics if available:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue