diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-11-20 10:39:20 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2022-02-23 08:22:00 +0100 |
commit | d90a2f160a1cd9a1745896c381afdf8d2812fd6b (patch) | |
tree | 53106f7a8235e34fb2bc6bcb6b0c1d2c48e8549a /kernel/sched | |
parent | 95458477f5b2dc436e3aa6aa25c0f84bb83e6195 (diff) |
sched/headers: Add header guard to kernel/sched/stats.h and kernel/sched/autogroup.h
Protect against multiple inclusion.
Also include "sched.h" in "stat.h", as it relies on it.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/autogroup.h | 5 | ||||
-rw-r--r-- | kernel/sched/stats.h | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched/autogroup.h b/kernel/sched/autogroup.h index 90fcbfdd70c3..90d69f2c5eaf 100644 --- a/kernel/sched/autogroup.h +++ b/kernel/sched/autogroup.h @@ -1,4 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _KERNEL_SCHED_AUTOGROUP_H +#define _KERNEL_SCHED_AUTOGROUP_H + #ifdef CONFIG_SCHED_AUTOGROUP struct autogroup { @@ -59,3 +62,5 @@ static inline int autogroup_path(struct task_group *tg, char *buf, int buflen) } #endif /* CONFIG_SCHED_AUTOGROUP */ + +#endif /* _KERNEL_SCHED_AUTOGROUP_H */ diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h index 3a3c826dd83a..edc0d13fc61b 100644 --- a/kernel/sched/stats.h +++ b/kernel/sched/stats.h @@ -1,7 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _KERNEL_STATS_H +#define _KERNEL_STATS_H #ifdef CONFIG_SCHEDSTATS +#include "sched.h" + extern struct static_key_false sched_schedstats; /* @@ -298,3 +302,5 @@ sched_info_switch(struct rq *rq, struct task_struct *prev, struct task_struct *n # define sched_info_dequeue(rq, t) do { } while (0) # define sched_info_switch(rq, t, next) do { } while (0) #endif /* CONFIG_SCHED_INFO */ + +#endif /* _KERNEL_STATS_H */ |