Commit 3fff4c42bd0a89869a0eb1e7874cc06ffa4aa0f5
1 parent
edaac8e316
Exists in
master
and in
4 other branches
printk: Remove ratelimit.h from kernel.h
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>
Showing 7 changed files with 10 additions and 3 deletions Side-by-side Diff
include/linux/kernel.h
... | ... | @@ -15,7 +15,6 @@ |
15 | 15 | #include <linux/bitops.h> |
16 | 16 | #include <linux/log2.h> |
17 | 17 | #include <linux/typecheck.h> |
18 | -#include <linux/ratelimit.h> | |
19 | 18 | #include <linux/dynamic_debug.h> |
20 | 19 | #include <asm/byteorder.h> |
21 | 20 | #include <asm/bug.h> |
... | ... | @@ -241,7 +240,6 @@ |
241 | 240 | asmlinkage int printk(const char * fmt, ...) |
242 | 241 | __attribute__ ((format (printf, 1, 2))) __cold; |
243 | 242 | |
244 | -extern struct ratelimit_state printk_ratelimit_state; | |
245 | 243 | extern int printk_ratelimit(void); |
246 | 244 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
247 | 245 | unsigned int interval_msec); |
include/linux/net.h
kernel/printk.c
kernel/sysctl.c
... | ... | @@ -37,6 +37,7 @@ |
37 | 37 | #include <linux/sysrq.h> |
38 | 38 | #include <linux/highuid.h> |
39 | 39 | #include <linux/writeback.h> |
40 | +#include <linux/ratelimit.h> | |
40 | 41 | #include <linux/hugetlb.h> |
41 | 42 | #include <linux/initrd.h> |
42 | 43 | #include <linux/key.h> |
... | ... | @@ -154,6 +155,8 @@ |
154 | 155 | extern int no_unaligned_warning; |
155 | 156 | extern int unaligned_dump_stack; |
156 | 157 | #endif |
158 | + | |
159 | +extern struct ratelimit_state printk_ratelimit_state; | |
157 | 160 | |
158 | 161 | #ifdef CONFIG_RT_MUTEXES |
159 | 162 | extern int max_lock_depth; |
lib/ratelimit.c
net/core/sysctl_net_core.c