Commit f5d87d85 authored by Namhyung Kim's avatar Namhyung Kim Committed by Linus Torvalds

printk: declare printk_ratelimit_state in ratelimit.h

Adding declaration of printk_ratelimit_state in ratelimit.h removes
potential build breakage and following sparse warning:

 kernel/printk.c:1426:1: warning: symbol 'printk_ratelimit_state' was not declared. Should it be static?

[akpm@linux-foundation.org: remove unneeded ifdef]
Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 674dff65
...@@ -36,6 +36,8 @@ static inline void ratelimit_state_init(struct ratelimit_state *rs, ...@@ -36,6 +36,8 @@ static inline void ratelimit_state_init(struct ratelimit_state *rs,
rs->begin = 0; rs->begin = 0;
} }
extern struct ratelimit_state printk_ratelimit_state;
extern int ___ratelimit(struct ratelimit_state *rs, const char *func); extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
#define __ratelimit(state) ___ratelimit(state, __func__) #define __ratelimit(state) ___ratelimit(state, __func__)
......
...@@ -161,8 +161,6 @@ extern int no_unaligned_warning; ...@@ -161,8 +161,6 @@ extern int no_unaligned_warning;
extern int unaligned_dump_stack; extern int unaligned_dump_stack;
#endif #endif
extern struct ratelimit_state printk_ratelimit_state;
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_PROC_SYSCTL
static int proc_do_cad_pid(struct ctl_table *table, int write, static int proc_do_cad_pid(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos); void __user *buffer, size_t *lenp, loff_t *ppos);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment