]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
printk: Remove ratelimit.h from kernel.h
authorIngo Molnar <mingo@elte.hu>
Tue, 22 Sep 2009 14:18:09 +0000 (16:18 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 22 Sep 2009 14:18:09 +0000 (16:18 +0200)
Decouple kernel.h from ratelimit.h: the global declaration of
printk's ratelimit_state is not needed, and it leads to messy
circular dependencies due to ratelimit.h's (new) adding of a
spinlock_types.h include.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David S. Miller <davem@davemloft.net>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/kernel.h
include/linux/net.h
kernel/printk.c
kernel/sysctl.c
lib/ratelimit.c
net/core/sysctl_net_core.c
net/core/utils.c

index 2b5b1e0899a81e93a4970e8f01924958423c968c..3305f33201be707dee8f1398dc2974cda6c31a93 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/bitops.h>
 #include <linux/log2.h>
 #include <linux/typecheck.h>
-#include <linux/ratelimit.h>
 #include <linux/dynamic_debug.h>
 #include <asm/byteorder.h>
 #include <asm/bug.h>
@@ -241,7 +240,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
 asmlinkage int printk(const char * fmt, ...)
        __attribute__ ((format (printf, 1, 2))) __cold;
 
-extern struct ratelimit_state printk_ratelimit_state;
 extern int printk_ratelimit(void);
 extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
                                   unsigned int interval_msec);
index 9040a10584f7fe0b11ae5012d42e3cf5bec9fcf2..df20f680f4555cb9b3818250dbe0ad2e53234922 100644 (file)
@@ -358,6 +358,7 @@ static const struct proto_ops name##_ops = {                        \
 
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
+#include <linux/ratelimit.h>
 extern struct ratelimit_state net_ratelimit_state;
 #endif
 
index 602033acd6c76e1f7ba06de0f053ff4ea4c28f77..b997c893cdcf128a05e2d38b396ac408830d37c7 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/bootmem.h>
 #include <linux/syscalls.h>
 #include <linux/kexec.h>
+#include <linux/ratelimit.h>
 
 #include <asm/uaccess.h>
 
index 1a631ba684a4ee73db8a13a1968265afd92a8fbf..6c37048b9db9954bb7498ddfaa258a5b3af30e5f 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/sysrq.h>
 #include <linux/highuid.h>
 #include <linux/writeback.h>
+#include <linux/ratelimit.h>
 #include <linux/hugetlb.h>
 #include <linux/initrd.h>
 #include <linux/key.h>
@@ -155,6 +156,8 @@ extern int no_unaligned_warning;
 extern int unaligned_dump_stack;
 #endif
 
+extern struct ratelimit_state printk_ratelimit_state;
+
 #ifdef CONFIG_RT_MUTEXES
 extern int max_lock_depth;
 #endif
index 69bfcacda16dce314b9f2658e84f2a7902a1dc6b..5551731ae1d49319ac0c4dc77c417a4feccddf44 100644 (file)
@@ -9,7 +9,7 @@
  * This file is released under the GPLv2.
  */
 
-#include <linux/kernel.h>
+#include <linux/ratelimit.h>
 #include <linux/jiffies.h>
 #include <linux/module.h>
 
index 7db1de0497c63bbde324cc354423dc11a06ef636..887c03c4e3c6d8078265c4e6ad69256dd77f0e58 100644 (file)
@@ -10,7 +10,9 @@
 #include <linux/module.h>
 #include <linux/socket.h>
 #include <linux/netdevice.h>
+#include <linux/ratelimit.h>
 #include <linux/init.h>
+
 #include <net/ip.h>
 #include <net/sock.h>
 
index 83221aee708488fdf52fc9c8a79ace483d96687d..838250241d26221f0ade44451b21697174185cab 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/types.h>
 #include <linux/percpu.h>
 #include <linux/init.h>
+#include <linux/ratelimit.h>
+
 #include <net/sock.h>
 
 #include <asm/byteorder.h>