summaryrefslogtreecommitdiff
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-09 10:39:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-09 10:39:13 +0300
commit10ee08292028d3d22d201a34ba7d24a085818cb3 (patch)
treecf3bff48a7eab154574355f00a4b4f27dc85ff11 /include/linux/net.h
parent7da4b8b7378790dd1e4af1bb7522863127fa1438 (diff)
parent44549e8f5eea4e0a41b487b63e616cb089922b99 (diff)
downloadlinux-10ee08292028d3d22d201a34ba7d24a085818cb3.tar.xz
Merge 4.6-rc7 into tty-next
We want the pty fixes in here as well so that patches can build on it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 49175e4ced11..f840d77c6c31 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -246,7 +246,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