Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1574711 > unrolled thread

[PATCH 83/89] timers: Remove the <linux/sysctl.h> include from <linux/timer.h>

Started byIngo Molnar <mingo@kernel.org>
First post2017-02-06 14:40 +0100
Last post2017-02-06 14:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 83/89] timers: Remove the <linux/sysctl.h> include from <linux/timer.h> Ingo Molnar <mingo@kernel.org> - 2017-02-06 14:40 +0100

#1574711 — [PATCH 83/89] timers: Remove the <linux/sysctl.h> include from <linux/timer.h>

FromIngo Molnar <mingo@kernel.org>
Date2017-02-06 14:40 +0100
Subject[PATCH 83/89] timers: Remove the <linux/sysctl.h> include from <linux/timer.h>
Message-ID<t7RGs-5x6-79@gated-at.bofh.it>
So we want to simplify <linux/sched.h>'s header dependencies, but one
roadblock of that is <linux/timer.h>'s inclusion of sysctl.h,
which brings in other, problematic headers.

Note that timer.h's inclusion of sysctl.h can be avoided if we
pre-declare ctl_table - so do that.

Also update usage sites that depended on the inclusion of sysctl.h
(or one of the headers included by sysctl.h).

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/timer.h   | 2 +-
 kernel/utsname_sysctl.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/timer.h b/include/linux/timer.h
index 51d601f192d4..6594ca6feb68 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -255,7 +255,7 @@ struct hrtimer;
 extern enum hrtimer_restart it_real_fn(struct hrtimer *);
 
 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
-#include <linux/sysctl.h>
+struct ctl_table;
 
 extern unsigned int sysctl_timer_migration;
 int timer_migration_handler(struct ctl_table *table, int write,
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index c8eac43267e9..233cd8fc6910 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -14,6 +14,7 @@
 #include <linux/utsname.h>
 #include <linux/sysctl.h>
 #include <linux/wait.h>
+#include <linux/rwsem.h>
 
 #ifdef CONFIG_PROC_SYSCTL
 
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web