diff options
author | Joe Perches <joe@perches.com> | 2014-11-11 13:59:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-11 14:10:31 -0500 |
commit | ba7a46f16dd29f93303daeb1fee8af316c5a07f4 (patch) | |
tree | 72568f33fadf0b75d02f6e30bca1404a5aae2530 /net/phonet | |
parent | 5b61c4db49e2530ed10631321d4c73f49d560a93 (diff) |
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/phonet')
-rw-r--r-- | net/phonet/af_phonet.c | 9 | ||||
-rw-r--r-- | net/phonet/pep-gprs.c | 3 | ||||
-rw-r--r-- | net/phonet/pep.c | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 5a940dbd74a3..32ab87d34828 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -426,16 +426,17 @@ static int phonet_rcv(struct sk_buff *skb, struct net_device *dev, | |||
426 | 426 | ||
427 | out_dev = phonet_route_output(net, pn_sockaddr_get_addr(&sa)); | 427 | out_dev = phonet_route_output(net, pn_sockaddr_get_addr(&sa)); |
428 | if (!out_dev) { | 428 | if (!out_dev) { |
429 | LIMIT_NETDEBUG(KERN_WARNING"No Phonet route to %02X\n", | 429 | net_dbg_ratelimited("No Phonet route to %02X\n", |
430 | pn_sockaddr_get_addr(&sa)); | 430 | pn_sockaddr_get_addr(&sa)); |
431 | goto out; | 431 | goto out; |
432 | } | 432 | } |
433 | 433 | ||
434 | __skb_push(skb, sizeof(struct phonethdr)); | 434 | __skb_push(skb, sizeof(struct phonethdr)); |
435 | skb->dev = out_dev; | 435 | skb->dev = out_dev; |
436 | if (out_dev == dev) { | 436 | if (out_dev == dev) { |
437 | LIMIT_NETDEBUG(KERN_ERR"Phonet loop to %02X on %s\n", | 437 | net_dbg_ratelimited("Phonet loop to %02X on %s\n", |
438 | pn_sockaddr_get_addr(&sa), dev->name); | 438 | pn_sockaddr_get_addr(&sa), |
439 | dev->name); | ||
439 | goto out_dev; | 440 | goto out_dev; |
440 | } | 441 | } |
441 | /* Some drivers (e.g. TUN) do not allocate HW header space */ | 442 | /* Some drivers (e.g. TUN) do not allocate HW header space */ |
diff --git a/net/phonet/pep-gprs.c b/net/phonet/pep-gprs.c index e9a83a637185..fa8237fdc57b 100644 --- a/net/phonet/pep-gprs.c +++ b/net/phonet/pep-gprs.c | |||
@@ -203,8 +203,7 @@ static netdev_tx_t gprs_xmit(struct sk_buff *skb, struct net_device *dev) | |||
203 | len = skb->len; | 203 | len = skb->len; |
204 | err = pep_write(sk, skb); | 204 | err = pep_write(sk, skb); |
205 | if (err) { | 205 | if (err) { |
206 | LIMIT_NETDEBUG(KERN_WARNING"%s: TX error (%d)\n", | 206 | net_dbg_ratelimited("%s: TX error (%d)\n", dev->name, err); |
207 | dev->name, err); | ||
208 | dev->stats.tx_aborted_errors++; | 207 | dev->stats.tx_aborted_errors++; |
209 | dev->stats.tx_errors++; | 208 | dev->stats.tx_errors++; |
210 | } else { | 209 | } else { |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 44b2123e22b8..9cd069dfaf65 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -272,8 +272,8 @@ static int pipe_rcv_status(struct sock *sk, struct sk_buff *skb) | |||
272 | 272 | ||
273 | hdr = pnp_hdr(skb); | 273 | hdr = pnp_hdr(skb); |
274 | if (hdr->data[0] != PN_PEP_TYPE_COMMON) { | 274 | if (hdr->data[0] != PN_PEP_TYPE_COMMON) { |
275 | LIMIT_NETDEBUG(KERN_DEBUG"Phonet unknown PEP type: %u\n", | 275 | net_dbg_ratelimited("Phonet unknown PEP type: %u\n", |
276 | (unsigned int)hdr->data[0]); | 276 | (unsigned int)hdr->data[0]); |
277 | return -EOPNOTSUPP; | 277 | return -EOPNOTSUPP; |
278 | } | 278 | } |
279 | 279 | ||
@@ -304,8 +304,8 @@ static int pipe_rcv_status(struct sock *sk, struct sk_buff *skb) | |||
304 | break; | 304 | break; |
305 | 305 | ||
306 | default: | 306 | default: |
307 | LIMIT_NETDEBUG(KERN_DEBUG"Phonet unknown PEP indication: %u\n", | 307 | net_dbg_ratelimited("Phonet unknown PEP indication: %u\n", |
308 | (unsigned int)hdr->data[1]); | 308 | (unsigned int)hdr->data[1]); |
309 | return -EOPNOTSUPP; | 309 | return -EOPNOTSUPP; |
310 | } | 310 | } |
311 | if (wake) | 311 | if (wake) |
@@ -451,8 +451,8 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
451 | break; | 451 | break; |
452 | 452 | ||
453 | default: | 453 | default: |
454 | LIMIT_NETDEBUG(KERN_DEBUG"Phonet unknown PEP message: %u\n", | 454 | net_dbg_ratelimited("Phonet unknown PEP message: %u\n", |
455 | hdr->message_id); | 455 | hdr->message_id); |
456 | err = -EINVAL; | 456 | err = -EINVAL; |
457 | } | 457 | } |
458 | out: | 458 | out: |