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

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

+18 -18
+18 -18
kernel/sched/deadline.c
··· 55 55 return 0; 56 56 } 57 57 late_initcall(sched_dl_sysctl_init); 58 - #endif 58 + #endif /* CONFIG_SYSCTL */ 59 59 60 60 static bool dl_server(struct sched_dl_entity *dl_se) 61 61 { ··· 103 103 { 104 104 return pi_of(dl_se) != dl_se; 105 105 } 106 - #else 106 + #else /* !CONFIG_RT_MUTEXES: */ 107 107 static inline struct sched_dl_entity *pi_of(struct sched_dl_entity *dl_se) 108 108 { 109 109 return dl_se; ··· 113 113 { 114 114 return false; 115 115 } 116 - #endif 116 + #endif /* !CONFIG_RT_MUTEXES */ 117 117 118 118 #ifdef CONFIG_SMP 119 119 static inline struct dl_bw *dl_bw_of(int i) ··· 195 195 rq->dl.extra_bw += bw; 196 196 } 197 197 } 198 - #else 198 + #else /* !CONFIG_SMP: */ 199 199 static inline struct dl_bw *dl_bw_of(int i) 200 200 { 201 201 return &cpu_rq(i)->dl.dl_bw; ··· 223 223 224 224 dl->extra_bw += bw; 225 225 } 226 - #endif 226 + #endif /* !CONFIG_SMP */ 227 227 228 228 static inline 229 229 void __dl_sub(struct dl_bw *dl_b, u64 tsk_bw, int cpus) ··· 757 757 return later_rq; 758 758 } 759 759 760 - #else 760 + #else /* !CONFIG_SMP: */ 761 761 762 762 static inline 763 763 void enqueue_pushable_dl_task(struct rq *rq, struct task_struct *p) ··· 786 786 static inline void deadline_queue_pull_task(struct rq *rq) 787 787 { 788 788 } 789 - #endif /* CONFIG_SMP */ 789 + #endif /* !CONFIG_SMP */ 790 790 791 791 static void 792 792 enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags); ··· 1213 1213 push_dl_task(rq); 1214 1214 rq_repin_lock(rq, rf); 1215 1215 } 1216 - #endif 1216 + #endif /* CONFIG_SMP */ 1217 1217 } 1218 1218 1219 1219 /* a defer timer will not be reset if the runtime consumed was < dl_server_min_res */ ··· 1360 1360 * there. 1361 1361 */ 1362 1362 } 1363 - #endif 1363 + #endif /* CONFIG_SMP */ 1364 1364 1365 1365 enqueue_task_dl(rq, p, ENQUEUE_REPLENISH); 1366 1366 if (dl_task(rq->donor)) ··· 1602 1602 rt_rq->rt_time += delta_exec; 1603 1603 raw_spin_unlock(&rt_rq->rt_runtime_lock); 1604 1604 } 1605 - #endif 1605 + #endif /* CONFIG_RT_GROUP_SCHED */ 1606 1606 } 1607 1607 1608 1608 /* ··· 1885 1885 } 1886 1886 } 1887 1887 1888 - #else 1888 + #else /* !CONFIG_SMP: */ 1889 1889 1890 1890 static inline void inc_dl_deadline(struct dl_rq *dl_rq, u64 deadline) {} 1891 1891 static inline void dec_dl_deadline(struct dl_rq *dl_rq, u64 deadline) {} 1892 1892 1893 - #endif /* CONFIG_SMP */ 1893 + #endif /* !CONFIG_SMP */ 1894 1894 1895 1895 static inline 1896 1896 void inc_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) ··· 2379 2379 { 2380 2380 hrtick_start(rq, dl_se->runtime); 2381 2381 } 2382 - #else /* !CONFIG_SCHED_HRTICK */ 2382 + #else /* !CONFIG_SCHED_HRTICK: */ 2383 2383 static void start_hrtick_dl(struct rq *rq, struct sched_dl_entity *dl_se) 2384 2384 { 2385 2385 } 2386 - #endif 2386 + #endif /* !CONFIG_SCHED_HRTICK */ 2387 2387 2388 2388 static void set_next_task_dl(struct rq *rq, struct task_struct *p, bool first) 2389 2389 { ··· 3125 3125 dl_time_before(p->dl.deadline, rq->curr->dl.deadline)) 3126 3126 resched_curr(rq); 3127 3127 } 3128 - #else 3128 + #else /* !CONFIG_SMP: */ 3129 3129 /* 3130 3130 * We don't know if p has a earlier or later deadline, so let's blindly 3131 3131 * set a (maybe not needed) rescheduling point. 3132 3132 */ 3133 3133 resched_curr(rq); 3134 - #endif 3134 + #endif /* !CONFIG_SMP */ 3135 3135 } 3136 3136 3137 3137 #ifdef CONFIG_SCHED_CORE ··· 3162 3162 .rq_offline = rq_offline_dl, 3163 3163 .task_woken = task_woken_dl, 3164 3164 .find_lock_rq = find_lock_later_rq, 3165 - #endif 3165 + #endif /* CONFIG_SMP */ 3166 3166 3167 3167 .task_tick = task_tick_dl, 3168 3168 .task_fork = task_fork_dl, ··· 3574 3574 { 3575 3575 dl_bw_manage(dl_bw_req_free, cpu, dl_bw); 3576 3576 } 3577 - #endif 3577 + #endif /* CONFIG_SMP */ 3578 3578 3579 3579 void print_dl_stats(struct seq_file *m, int cpu) 3580 3580 {