diff options
author | Joe Perches <joe@perches.com> | 2012-05-15 10:11:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-16 01:01:03 -0400 |
commit | f32138319ca6541e65f95f8e17c9cc88ac1baf94 (patch) | |
tree | 20505f3d5955d89d3763a6182052a8e9b37eaf37 /net/ipv6/mip6.c | |
parent | 82251de2a2b7b84987dde104d48a765b63170149 (diff) |
net: ipv6: Standardize prefixes for message logging
Add #define pr_fmt(fmt) as appropriate.
Add "IPv6: " to appropriate files.
Convert printk(KERN_<LEVEL> to pr_<level> (but not KERN_DEBUG).
Standardize on "%s: " not "%s(): " when emitting __func__.
Use "%s: ", __func__ instead of embedding function name.
Coalesce formats, align arguments.
ADDRCONF output is now prefixed with "IPv6: "
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/mip6.c')
-rw-r--r-- | net/ipv6/mip6.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index 7e1e0fbfef21..2e02f7c9d76d 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
@@ -22,6 +22,8 @@ | |||
22 | * Masahide NAKAMURA @USAGI | 22 | * Masahide NAKAMURA @USAGI |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
26 | |||
25 | #include <linux/module.h> | 27 | #include <linux/module.h> |
26 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
27 | #include <linux/time.h> | 29 | #include <linux/time.h> |
@@ -307,13 +309,12 @@ static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb, | |||
307 | static int mip6_destopt_init_state(struct xfrm_state *x) | 309 | static int mip6_destopt_init_state(struct xfrm_state *x) |
308 | { | 310 | { |
309 | if (x->id.spi) { | 311 | if (x->id.spi) { |
310 | printk(KERN_INFO "%s: spi is not 0: %u\n", __func__, | 312 | pr_info("%s: spi is not 0: %u\n", __func__, x->id.spi); |
311 | x->id.spi); | ||
312 | return -EINVAL; | 313 | return -EINVAL; |
313 | } | 314 | } |
314 | if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { | 315 | if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { |
315 | printk(KERN_INFO "%s: state's mode is not %u: %u\n", | 316 | pr_info("%s: state's mode is not %u: %u\n", |
316 | __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); | 317 | __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); |
317 | return -EINVAL; | 318 | return -EINVAL; |
318 | } | 319 | } |
319 | 320 | ||
@@ -443,13 +444,12 @@ static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb, | |||
443 | static int mip6_rthdr_init_state(struct xfrm_state *x) | 444 | static int mip6_rthdr_init_state(struct xfrm_state *x) |
444 | { | 445 | { |
445 | if (x->id.spi) { | 446 | if (x->id.spi) { |
446 | printk(KERN_INFO "%s: spi is not 0: %u\n", __func__, | 447 | pr_info("%s: spi is not 0: %u\n", __func__, x->id.spi); |
447 | x->id.spi); | ||
448 | return -EINVAL; | 448 | return -EINVAL; |
449 | } | 449 | } |
450 | if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { | 450 | if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { |
451 | printk(KERN_INFO "%s: state's mode is not %u: %u\n", | 451 | pr_info("%s: state's mode is not %u: %u\n", |
452 | __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); | 452 | __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); |
453 | return -EINVAL; | 453 | return -EINVAL; |
454 | } | 454 | } |
455 | 455 | ||
@@ -481,18 +481,18 @@ static const struct xfrm_type mip6_rthdr_type = | |||
481 | 481 | ||
482 | static int __init mip6_init(void) | 482 | static int __init mip6_init(void) |
483 | { | 483 | { |
484 | printk(KERN_INFO "Mobile IPv6\n"); | 484 | pr_info("Mobile IPv6\n"); |
485 | 485 | ||
486 | if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) { | 486 | if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) { |
487 | printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __func__); | 487 | pr_info("%s: can't add xfrm type(destopt)\n", __func__); |
488 | goto mip6_destopt_xfrm_fail; | 488 | goto mip6_destopt_xfrm_fail; |
489 | } | 489 | } |
490 | if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) { | 490 | if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) { |
491 | printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __func__); | 491 | pr_info("%s: can't add xfrm type(rthdr)\n", __func__); |
492 | goto mip6_rthdr_xfrm_fail; | 492 | goto mip6_rthdr_xfrm_fail; |
493 | } | 493 | } |
494 | if (rawv6_mh_filter_register(mip6_mh_filter) < 0) { | 494 | if (rawv6_mh_filter_register(mip6_mh_filter) < 0) { |
495 | printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __func__); | 495 | pr_info("%s: can't add rawv6 mh filter\n", __func__); |
496 | goto mip6_rawv6_mh_fail; | 496 | goto mip6_rawv6_mh_fail; |
497 | } | 497 | } |
498 | 498 | ||
@@ -510,11 +510,11 @@ static int __init mip6_init(void) | |||
510 | static void __exit mip6_fini(void) | 510 | static void __exit mip6_fini(void) |
511 | { | 511 | { |
512 | if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0) | 512 | if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0) |
513 | printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __func__); | 513 | pr_info("%s: can't remove rawv6 mh filter\n", __func__); |
514 | if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0) | 514 | if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0) |
515 | printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __func__); | 515 | pr_info("%s: can't remove xfrm type(rthdr)\n", __func__); |
516 | if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0) | 516 | if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0) |
517 | printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __func__); | 517 | pr_info("%s: can't remove xfrm type(destopt)\n", __func__); |
518 | } | 518 | } |
519 | 519 | ||
520 | module_init(mip6_init); | 520 | module_init(mip6_init); |