aboutsummaryrefslogtreecommitdiff
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-20 12:16:37 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-20 12:16:37 +0800
commit510d0a3f869611dcd001a2b7627fa5dded4579af (patch)
treeba06ce27af2f3aa194a268e3f26f0665c21357a9 /include/linux/net.h
parente37ddf27108a992e191b27df9bd532cb9157dc89 (diff)
parent544ec5b08d007f184ab97abdbed87e613c8c0b83 (diff)
Merge tag 'v4.4.11' into linux-linaro-lsk-v4.4lsk-v4.4-16.05
This is the 4.4.11 stable release
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index 0b4ac7da583a..25ef630f1bd6 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -245,7 +245,15 @@ do { \
net_ratelimited_function(pr_warn, fmt, ##__VA_ARGS__)
#define net_info_ratelimited(fmt, ...) \
net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
-#if defined(DEBUG)
+#if defined(CONFIG_DYNAMIC_DEBUG)
+#define net_dbg_ratelimited(fmt, ...) \
+do { \
+ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
+ if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
+ net_ratelimit()) \
+ __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \
+} while (0)
+#elif defined(DEBUG)
#define net_dbg_ratelimited(fmt, ...) \
net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)
#else