[PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h>

From: Ingo Molnar
Date: Wed Feb 08 2017 - 14:12:45 EST


After adding a 'struct task_struct' predeclaration the <linux/sched/wake_q.h>
file becomes a self-contained header and users of it either don't need
<linux/sched.h> - or have already included it.

This reduces the size of the header dependency graph.

Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
include/linux/sched/wake_q.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h
index ed66823e845b..e6774a0385fb 100644
--- a/include/linux/sched/wake_q.h
+++ b/include/linux/sched/wake_q.h
@@ -1,8 +1,6 @@
#ifndef _LINUX_SCHED_WAKE_Q_H
#define _LINUX_SCHED_WAKE_Q_H

-#include <linux/sched.h>
-
/*
* Wake-queues are lists of tasks with a pending wakeup, whose
* callers have already marked the task as woken internally,
@@ -29,6 +27,9 @@
* must ensure the call is done inside a loop, confirming that the
* wakeup condition has in fact occurred.
*/
+
+struct task_struct;
+
struct wake_q_node {
struct wake_q_node *next;
};
--
2.7.4