diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-06-22 22:05:39 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-06-22 22:05:39 -0400 |
commit | 23dc00de78fbfea39b61aae2d261b621fee7853d (patch) | |
tree | 047ca618c7a40ad61fe71470a889d2871a0b0c4a /include/linux/printk.h | |
parent | ff2ebf3f75814bc45353013782ebeb1556adfc05 (diff) |
Fix printk_ratelimited()
printk_ratelimited was behind an #ifdef CONFIG_PRINTK, which we don't
define, so it was a complete noop - oops.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'include/linux/printk.h')
-rw-r--r-- | include/linux/printk.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index bc1619f7..df9c1920 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -5,6 +5,7 @@ #define pr_fmt(fmt) fmt #endif +#include <linux/compiler.h> #include <stdarg.h> #include <stdio.h> @@ -169,7 +170,6 @@ static inline int scnprintf(char * buf, size_t size, const char * fmt, ...) * ratelimited messages with local ratelimit_state, * no local ratelimit_state used in the !PRINTK case */ -#ifdef CONFIG_PRINTK #define printk_ratelimited(fmt, ...) \ ({ \ static DEFINE_RATELIMIT_STATE(_rs, \ @@ -179,10 +179,6 @@ static inline int scnprintf(char * buf, size_t size, const char * fmt, ...) if (__ratelimit(&_rs)) \ printk(fmt, ##__VA_ARGS__); \ }) -#else -#define printk_ratelimited(fmt, ...) \ - no_printk(fmt, ##__VA_ARGS__) -#endif #define pr_emerg_ratelimited(fmt, ...) \ printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) |