linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: sched/core] sched/headers: Add header guard to kernel/sched/stats.h and kernel/sched/autogroup.h
@ 2022-03-15  8:31 tip-bot2 for Ingo Molnar
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Ingo Molnar @ 2022-03-15  8:31 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Ingo Molnar, Peter Zijlstra, x86, linux-kernel

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     d90a2f160a1cd9a1745896c381afdf8d2812fd6b
Gitweb:        https://git.kernel.org/tip/d90a2f160a1cd9a1745896c381afdf8d2812fd6b
Author:        Ingo Molnar <mingo@kernel.org>
AuthorDate:    Sat, 20 Nov 2021 10:39:20 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 23 Feb 2022 08:22:00 +01:00

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>
---
 kernel/sched/autogroup.h | 5 +++++
 kernel/sched/stats.h     | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/kernel/sched/autogroup.h b/kernel/sched/autogroup.h
index 90fcbfd..90d69f2 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 3a3c826..edc0d13 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 */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-15  8:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15  8:31 [tip: sched/core] sched/headers: Add header guard to kernel/sched/stats.h and kernel/sched/autogroup.h tip-bot2 for Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).