summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-11-11 10:59:17 -0800
committerDavid S. Miller <davem@davemloft.net>2014-11-11 14:10:31 -0500
commitba7a46f16dd29f93303daeb1fee8af316c5a07f4 (patch)
tree72568f33fadf0b75d02f6e30bca1404a5aae2530 /net/core
parent5b61c4db49e2530ed10631321d4c73f49d560a93 (diff)
downloadop-kernel-dev-ba7a46f16dd29f93303daeb1fee8af316c5a07f4.zip
op-kernel-dev-ba7a46f16dd29f93303daeb1fee8af316c5a07f4.tar.gz
net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited
Use the more common dynamic_debug capable net_dbg_ratelimited and remove the LIMIT_NETDEBUG macro. All messages are still ratelimited. Some KERN_<LEVEL> uses are changed to KERN_DEBUG. This may have some negative impact on messages that were emitted at KERN_INFO that are not not enabled at all unless DEBUG is defined or dynamic_debug is enabled. Even so, these messages are now _not_ emitted by default. This also eliminates the use of the net_msg_warn sysctl "/proc/sys/net/core/warnings". For backward compatibility, the sysctl is not removed, but it has no function. The extern declaration of net_msg_warn is removed from sock.h and made static in net/core/sysctl_net_core.c Miscellanea: o Update the sysctl documentation o Remove the embedded uses of pr_fmt o Coalesce format fragments o Realign arguments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sysctl_net_core.c2
-rw-r--r--net/core/utils.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index cf9cd13..f93f092 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -26,6 +26,8 @@ static int zero = 0;
static int one = 1;
static int ushort_max = USHRT_MAX;
+static int net_msg_warn; /* Unused, but still a sysctl */
+
#ifdef CONFIG_RPS
static int rps_sock_flow_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
diff --git a/net/core/utils.c b/net/core/utils.c
index efc76dd..7b80388 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -33,9 +33,6 @@
#include <asm/byteorder.h>
#include <asm/uaccess.h>
-int net_msg_warn __read_mostly = 1;
-EXPORT_SYMBOL(net_msg_warn);
-
DEFINE_RATELIMIT_STATE(net_ratelimit_state, 5 * HZ, 10);
/*
* All net warning printk()s should be guarded by this function.
OpenPOWER on IntegriCloud