diff options
| -rw-r--r-- | include/linux/net.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 04aa06852771..049d4b03c4c4 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -239,8 +239,16 @@ do { \ | |||
| 239 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) | 239 | net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__) |
| 240 | #define net_info_ratelimited(fmt, ...) \ | 240 | #define net_info_ratelimited(fmt, ...) \ |
| 241 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) | 241 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) |
| 242 | #if defined(DEBUG) | ||
| 242 | #define net_dbg_ratelimited(fmt, ...) \ | 243 | #define net_dbg_ratelimited(fmt, ...) \ |
| 243 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 244 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
| 245 | #else | ||
| 246 | #define net_dbg_ratelimited(fmt, ...) \ | ||
| 247 | do { \ | ||
| 248 | if (0) \ | ||
| 249 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ | ||
| 250 | } while (0) | ||
| 251 | #endif | ||
| 244 | 252 | ||
| 245 | bool __net_get_random_once(void *buf, int nbytes, bool *done, | 253 | bool __net_get_random_once(void *buf, int nbytes, bool *done, |
| 246 | struct static_key *done_key); | 254 | struct static_key *done_key); |
