aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-05-15 10:11:53 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-16 01:01:03 -0400
commitf32138319ca6541e65f95f8e17c9cc88ac1baf94 (patch)
tree20505f3d5955d89d3763a6182052a8e9b37eaf37
parent82251de2a2b7b84987dde104d48a765b63170149 (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>
-rw-r--r--net/ipv6/addrconf.c53
-rw-r--r--net/ipv6/addrlabel.c2
-rw-r--r--net/ipv6/af_inet6.c14
-rw-r--r--net/ipv6/ah6.c16
-rw-r--r--net/ipv6/esp6.c10
-rw-r--r--net/ipv6/icmp.c8
-rw-r--r--net/ipv6/ip6_fib.c20
-rw-r--r--net/ipv6/ip6_tunnel.c21
-rw-r--r--net/ipv6/ip6mr.c2
-rw-r--r--net/ipv6/ipcomp6.c11
-rw-r--r--net/ipv6/mcast.c3
-rw-r--r--net/ipv6/mip6.c30
-rw-r--r--net/ipv6/ndisc.c22
-rw-r--r--net/ipv6/route.c8
-rw-r--r--net/ipv6/sit.c6
-rw-r--r--net/ipv6/tunnel6.c10
16 files changed, 116 insertions, 120 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4d1d51a0bd26..707989068555 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -38,6 +38,8 @@
38 * status etc. 38 * status etc.
39 */ 39 */
40 40
41#define pr_fmt(fmt) "IPv6: " fmt
42
41#include <linux/errno.h> 43#include <linux/errno.h>
42#include <linux/types.h> 44#include <linux/types.h>
43#include <linux/kernel.h> 45#include <linux/kernel.h>
@@ -327,11 +329,11 @@ void in6_dev_finish_destroy(struct inet6_dev *idev)
327 WARN_ON(idev->mc_list != NULL); 329 WARN_ON(idev->mc_list != NULL);
328 330
329#ifdef NET_REFCNT_DEBUG 331#ifdef NET_REFCNT_DEBUG
330 printk(KERN_DEBUG "in6_dev_finish_destroy: %s\n", dev ? dev->name : "NIL"); 332 printk(KERN_DEBUG "%s: %s\n", __func__, dev ? dev->name : "NIL");
331#endif 333#endif
332 dev_put(dev); 334 dev_put(dev);
333 if (!idev->dead) { 335 if (!idev->dead) {
334 pr_warning("Freeing alive inet6 device %p\n", idev); 336 pr_warn("Freeing alive inet6 device %p\n", idev);
335 return; 337 return;
336 } 338 }
337 snmp6_free_dev(idev); 339 snmp6_free_dev(idev);
@@ -372,7 +374,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
372 374
373 if (snmp6_alloc_dev(ndev) < 0) { 375 if (snmp6_alloc_dev(ndev) < 0) {
374 ADBG((KERN_WARNING 376 ADBG((KERN_WARNING
375 "%s(): cannot allocate memory for statistics; dev=%s.\n", 377 "%s: cannot allocate memory for statistics; dev=%s.\n",
376 __func__, dev->name)); 378 __func__, dev->name));
377 neigh_parms_release(&nd_tbl, ndev->nd_parms); 379 neigh_parms_release(&nd_tbl, ndev->nd_parms);
378 dev_put(dev); 380 dev_put(dev);
@@ -382,7 +384,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
382 384
383 if (snmp6_register_dev(ndev) < 0) { 385 if (snmp6_register_dev(ndev) < 0) {
384 ADBG((KERN_WARNING 386 ADBG((KERN_WARNING
385 "%s(): cannot create /proc/net/dev_snmp6/%s\n", 387 "%s: cannot create /proc/net/dev_snmp6/%s\n",
386 __func__, dev->name)); 388 __func__, dev->name));
387 neigh_parms_release(&nd_tbl, ndev->nd_parms); 389 neigh_parms_release(&nd_tbl, ndev->nd_parms);
388 ndev->dead = 1; 390 ndev->dead = 1;
@@ -400,9 +402,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
400 402
401#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) 403#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE)
402 if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { 404 if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) {
403 printk(KERN_INFO 405 pr_info("%s: Disabled Multicast RS\n", dev->name);
404 "%s: Disabled Multicast RS\n",
405 dev->name);
406 ndev->cnf.rtr_solicits = 0; 406 ndev->cnf.rtr_solicits = 0;
407 } 407 }
408#endif 408#endif
@@ -551,7 +551,7 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp)
551 pr_notice("Timer is still running, when freeing ifa=%p\n", ifp); 551 pr_notice("Timer is still running, when freeing ifa=%p\n", ifp);
552 552
553 if (ifp->state != INET6_IFADDR_STATE_DEAD) { 553 if (ifp->state != INET6_IFADDR_STATE_DEAD) {
554 pr_warning("Freeing alive inet6 address %p\n", ifp); 554 pr_warn("Freeing alive inet6 address %p\n", ifp);
555 return; 555 return;
556 } 556 }
557 dst_release(&ifp->rt->dst); 557 dst_release(&ifp->rt->dst);
@@ -841,8 +841,7 @@ retry:
841 in6_dev_hold(idev); 841 in6_dev_hold(idev);
842 if (idev->cnf.use_tempaddr <= 0) { 842 if (idev->cnf.use_tempaddr <= 0) {
843 write_unlock(&idev->lock); 843 write_unlock(&idev->lock);
844 printk(KERN_INFO 844 pr_info("%s: use_tempaddr is disabled\n", __func__);
845 "ipv6_create_tempaddr(): use_tempaddr is disabled.\n");
846 in6_dev_put(idev); 845 in6_dev_put(idev);
847 ret = -1; 846 ret = -1;
848 goto out; 847 goto out;
@@ -852,8 +851,8 @@ retry:
852 idev->cnf.use_tempaddr = -1; /*XXX*/ 851 idev->cnf.use_tempaddr = -1; /*XXX*/
853 spin_unlock_bh(&ifp->lock); 852 spin_unlock_bh(&ifp->lock);
854 write_unlock(&idev->lock); 853 write_unlock(&idev->lock);
855 printk(KERN_WARNING 854 pr_warn("%s: regeneration time exceeded - disabled temporary address support\n",
856 "ipv6_create_tempaddr(): regeneration time exceeded. disabled temporary address support.\n"); 855 __func__);
857 in6_dev_put(idev); 856 in6_dev_put(idev);
858 ret = -1; 857 ret = -1;
859 goto out; 858 goto out;
@@ -863,8 +862,8 @@ retry:
863 if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) { 862 if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
864 spin_unlock_bh(&ifp->lock); 863 spin_unlock_bh(&ifp->lock);
865 write_unlock(&idev->lock); 864 write_unlock(&idev->lock);
866 printk(KERN_WARNING 865 pr_warn("%s: regeneration of randomized interface id failed\n",
867 "ipv6_create_tempaddr(): regeneration of randomized interface id failed.\n"); 866 __func__);
868 in6_ifa_put(ifp); 867 in6_ifa_put(ifp);
869 in6_dev_put(idev); 868 in6_dev_put(idev);
870 ret = -1; 869 ret = -1;
@@ -914,8 +913,7 @@ retry:
914 if (!ift || IS_ERR(ift)) { 913 if (!ift || IS_ERR(ift)) {
915 in6_ifa_put(ifp); 914 in6_ifa_put(ifp);
916 in6_dev_put(idev); 915 in6_dev_put(idev);
917 printk(KERN_INFO 916 pr_info("%s: retry temporary address regeneration\n", __func__);
918 "ipv6_create_tempaddr(): retry temporary address regeneration.\n");
919 tmpaddr = &addr; 917 tmpaddr = &addr;
920 write_lock(&idev->lock); 918 write_lock(&idev->lock);
921 goto retry; 919 goto retry;
@@ -1429,7 +1427,7 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp)
1429 /* DAD failed for link-local based on MAC address */ 1427 /* DAD failed for link-local based on MAC address */
1430 idev->cnf.disable_ipv6 = 1; 1428 idev->cnf.disable_ipv6 = 1;
1431 1429
1432 printk(KERN_INFO "%s: IPv6 being disabled!\n", 1430 pr_info("%s: IPv6 being disabled!\n",
1433 ifp->idev->dev->name); 1431 ifp->idev->dev->name);
1434 } 1432 }
1435 } 1433 }
@@ -1660,9 +1658,8 @@ static void ipv6_regen_rndid(unsigned long data)
1660 idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time - 1658 idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time -
1661 idev->cnf.max_desync_factor * HZ; 1659 idev->cnf.max_desync_factor * HZ;
1662 if (time_before(expires, jiffies)) { 1660 if (time_before(expires, jiffies)) {
1663 printk(KERN_WARNING 1661 pr_warn("%s: too short regeneration interval; timer disabled for %s\n",
1664 "ipv6_regen_rndid(): too short regeneration interval; timer disabled for %s.\n", 1662 __func__, idev->dev->name);
1665 idev->dev->name);
1666 goto out; 1663 goto out;
1667 } 1664 }
1668 1665
@@ -2507,7 +2504,7 @@ static void addrconf_gre_config(struct net_device *dev)
2507 struct inet6_dev *idev; 2504 struct inet6_dev *idev;
2508 struct in6_addr addr; 2505 struct in6_addr addr;
2509 2506
2510 pr_info("ipv6: addrconf_gre_config(%s)\n", dev->name); 2507 pr_info("%s(%s)\n", __func__, dev->name);
2511 2508
2512 ASSERT_RTNL(); 2509 ASSERT_RTNL();
2513 2510
@@ -2599,9 +2596,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
2599 if (event == NETDEV_UP) { 2596 if (event == NETDEV_UP) {
2600 if (!addrconf_qdisc_ok(dev)) { 2597 if (!addrconf_qdisc_ok(dev)) {
2601 /* device is not ready yet. */ 2598 /* device is not ready yet. */
2602 printk(KERN_INFO 2599 pr_info("ADDRCONF(NETDEV_UP): %s: link is not ready\n",
2603 "ADDRCONF(NETDEV_UP): %s: "
2604 "link is not ready\n",
2605 dev->name); 2600 dev->name);
2606 break; 2601 break;
2607 } 2602 }
@@ -2626,10 +2621,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
2626 idev->if_flags |= IF_READY; 2621 idev->if_flags |= IF_READY;
2627 } 2622 }
2628 2623
2629 printk(KERN_INFO 2624 pr_info("ADDRCONF(NETDEV_CHANGE): %s: link becomes ready\n",
2630 "ADDRCONF(NETDEV_CHANGE): %s: " 2625 dev->name);
2631 "link becomes ready\n",
2632 dev->name);
2633 2626
2634 run_pending = 1; 2627 run_pending = 1;
2635 } 2628 }
@@ -4757,8 +4750,8 @@ int __init addrconf_init(void)
4757 4750
4758 err = ipv6_addr_label_init(); 4751 err = ipv6_addr_label_init();
4759 if (err < 0) { 4752 if (err < 0) {
4760 printk(KERN_CRIT "IPv6 Addrconf:" 4753 pr_crit("%s: cannot initialize default policy table: %d\n",
4761 " cannot initialize default policy table: %d.\n", err); 4754 __func__, err);
4762 goto out; 4755 goto out;
4763 } 4756 }
4764 4757
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 2d8ddba9ee58..95aea16b8b6f 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -350,7 +350,7 @@ static int __net_init ip6addrlbl_net_init(struct net *net)
350 int err = 0; 350 int err = 0;
351 int i; 351 int i;
352 352
353 ADDRLABEL(KERN_DEBUG "%s()\n", __func__); 353 ADDRLABEL(KERN_DEBUG "%s\n", __func__);
354 354
355 for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) { 355 for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) {
356 int ret = ip6addrlbl_add(net, 356 int ret = ip6addrlbl_add(net,
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index bf8e14659e2d..138d4986c327 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -18,6 +18,7 @@
18 * 2 of the License, or (at your option) any later version. 18 * 2 of the License, or (at your option) any later version.
19 */ 19 */
20 20
21#define pr_fmt(fmt) "IPv6: " fmt
21 22
22#include <linux/module.h> 23#include <linux/module.h>
23#include <linux/capability.h> 24#include <linux/capability.h>
@@ -612,13 +613,11 @@ out:
612 return ret; 613 return ret;
613 614
614out_permanent: 615out_permanent:
615 printk(KERN_ERR "Attempt to override permanent protocol %d.\n", 616 pr_err("Attempt to override permanent protocol %d\n", protocol);
616 protocol);
617 goto out; 617 goto out;
618 618
619out_illegal: 619out_illegal:
620 printk(KERN_ERR 620 pr_err("Ignoring attempt to register invalid socket type %d\n",
621 "Ignoring attempt to register invalid socket type %d.\n",
622 p->type); 621 p->type);
623 goto out; 622 goto out;
624} 623}
@@ -628,8 +627,7 @@ void
628inet6_unregister_protosw(struct inet_protosw *p) 627inet6_unregister_protosw(struct inet_protosw *p)
629{ 628{
630 if (INET_PROTOSW_PERMANENT & p->flags) { 629 if (INET_PROTOSW_PERMANENT & p->flags) {
631 printk(KERN_ERR 630 pr_err("Attempt to unregister permanent protocol %d\n",
632 "Attempt to unregister permanent protocol %d.\n",
633 p->protocol); 631 p->protocol);
634 } else { 632 } else {
635 spin_lock_bh(&inetsw6_lock); 633 spin_lock_bh(&inetsw6_lock);
@@ -1067,9 +1065,7 @@ static int __init inet6_init(void)
1067 INIT_LIST_HEAD(r); 1065 INIT_LIST_HEAD(r);
1068 1066
1069 if (disable_ipv6_mod) { 1067 if (disable_ipv6_mod) {
1070 printk(KERN_INFO 1068 pr_info("Loaded, but administratively disabled, reboot required to enable\n");
1071 "IPv6: Loaded, but administratively disabled, "
1072 "reboot required to enable\n");
1073 goto out; 1069 goto out;
1074 } 1070 }
1075 1071
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index a9f4156f7c3f..9aa3d010ac5d 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -24,6 +24,8 @@
24 * This file is derived from net/ipv4/ah.c. 24 * This file is derived from net/ipv4/ah.c.
25 */ 25 */
26 26
27#define pr_fmt(fmt) "IPv6: " fmt
28
27#include <crypto/hash.h> 29#include <crypto/hash.h>
28#include <linux/module.h> 30#include <linux/module.h>
29#include <linux/slab.h> 31#include <linux/slab.h>
@@ -659,9 +661,9 @@ static int ah6_init_state(struct xfrm_state *x)
659 661
660 if (aalg_desc->uinfo.auth.icv_fullbits/8 != 662 if (aalg_desc->uinfo.auth.icv_fullbits/8 !=
661 crypto_ahash_digestsize(ahash)) { 663 crypto_ahash_digestsize(ahash)) {
662 printk(KERN_INFO "AH: %s digestsize %u != %hu\n", 664 pr_info("AH: %s digestsize %u != %hu\n",
663 x->aalg->alg_name, crypto_ahash_digestsize(ahash), 665 x->aalg->alg_name, crypto_ahash_digestsize(ahash),
664 aalg_desc->uinfo.auth.icv_fullbits/8); 666 aalg_desc->uinfo.auth.icv_fullbits/8);
665 goto error; 667 goto error;
666 } 668 }
667 669
@@ -727,12 +729,12 @@ static const struct inet6_protocol ah6_protocol = {
727static int __init ah6_init(void) 729static int __init ah6_init(void)
728{ 730{
729 if (xfrm_register_type(&ah6_type, AF_INET6) < 0) { 731 if (xfrm_register_type(&ah6_type, AF_INET6) < 0) {
730 printk(KERN_INFO "ipv6 ah init: can't add xfrm type\n"); 732 pr_info("%s: can't add xfrm type\n", __func__);
731 return -EAGAIN; 733 return -EAGAIN;
732 } 734 }
733 735
734 if (inet6_add_protocol(&ah6_protocol, IPPROTO_AH) < 0) { 736 if (inet6_add_protocol(&ah6_protocol, IPPROTO_AH) < 0) {
735 printk(KERN_INFO "ipv6 ah init: can't add protocol\n"); 737 pr_info("%s: can't add protocol\n", __func__);
736 xfrm_unregister_type(&ah6_type, AF_INET6); 738 xfrm_unregister_type(&ah6_type, AF_INET6);
737 return -EAGAIN; 739 return -EAGAIN;
738 } 740 }
@@ -743,10 +745,10 @@ static int __init ah6_init(void)
743static void __exit ah6_fini(void) 745static void __exit ah6_fini(void)
744{ 746{
745 if (inet6_del_protocol(&ah6_protocol, IPPROTO_AH) < 0) 747 if (inet6_del_protocol(&ah6_protocol, IPPROTO_AH) < 0)
746 printk(KERN_INFO "ipv6 ah close: can't remove protocol\n"); 748 pr_info("%s: can't remove protocol\n", __func__);
747 749
748 if (xfrm_unregister_type(&ah6_type, AF_INET6) < 0) 750 if (xfrm_unregister_type(&ah6_type, AF_INET6) < 0)
749 printk(KERN_INFO "ipv6 ah close: can't remove xfrm type\n"); 751 pr_info("%s: can't remove xfrm type\n", __func__);
750 752
751} 753}
752 754
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 1ac7938dd9ec..6697eb0fba55 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -24,6 +24,8 @@
24 * This file is derived from net/ipv4/esp.c 24 * This file is derived from net/ipv4/esp.c
25 */ 25 */
26 26
27#define pr_fmt(fmt) "IPv6: " fmt
28
27#include <crypto/aead.h> 29#include <crypto/aead.h>
28#include <crypto/authenc.h> 30#include <crypto/authenc.h>
29#include <linux/err.h> 31#include <linux/err.h>
@@ -651,11 +653,11 @@ static const struct inet6_protocol esp6_protocol = {
651static int __init esp6_init(void) 653static int __init esp6_init(void)
652{ 654{
653 if (xfrm_register_type(&esp6_type, AF_INET6) < 0) { 655 if (xfrm_register_type(&esp6_type, AF_INET6) < 0) {
654 printk(KERN_INFO "ipv6 esp init: can't add xfrm type\n"); 656 pr_info("%s: can't add xfrm type\n", __func__);
655 return -EAGAIN; 657 return -EAGAIN;
656 } 658 }
657 if (inet6_add_protocol(&esp6_protocol, IPPROTO_ESP) < 0) { 659 if (inet6_add_protocol(&esp6_protocol, IPPROTO_ESP) < 0) {
658 printk(KERN_INFO "ipv6 esp init: can't add protocol\n"); 660 pr_info("%s: can't add protocol\n", __func__);
659 xfrm_unregister_type(&esp6_type, AF_INET6); 661 xfrm_unregister_type(&esp6_type, AF_INET6);
660 return -EAGAIN; 662 return -EAGAIN;
661 } 663 }
@@ -666,9 +668,9 @@ static int __init esp6_init(void)
666static void __exit esp6_fini(void) 668static void __exit esp6_fini(void)
667{ 669{
668 if (inet6_del_protocol(&esp6_protocol, IPPROTO_ESP) < 0) 670 if (inet6_del_protocol(&esp6_protocol, IPPROTO_ESP) < 0)
669 printk(KERN_INFO "ipv6 esp close: can't remove protocol\n"); 671 pr_info("%s: can't remove protocol\n", __func__);
670 if (xfrm_unregister_type(&esp6_type, AF_INET6) < 0) 672 if (xfrm_unregister_type(&esp6_type, AF_INET6) < 0)
671 printk(KERN_INFO "ipv6 esp close: can't remove xfrm type\n"); 673 pr_info("%s: can't remove xfrm type\n", __func__);
672} 674}
673 675
674module_init(esp6_init); 676module_init(esp6_init);
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index cc079d8d4681..23c56ce9e86b 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -29,6 +29,8 @@
29 * Kazunori MIYAZAWA @USAGI: change output process to use ip6_append_data 29 * Kazunori MIYAZAWA @USAGI: change output process to use ip6_append_data
30 */ 30 */
31 31
32#define pr_fmt(fmt) "IPv6: " fmt
33
32#include <linux/module.h> 34#include <linux/module.h>
33#include <linux/errno.h> 35#include <linux/errno.h>
34#include <linux/types.h> 36#include <linux/types.h>
@@ -820,9 +822,7 @@ static int __net_init icmpv6_sk_init(struct net *net)
820 err = inet_ctl_sock_create(&sk, PF_INET6, 822 err = inet_ctl_sock_create(&sk, PF_INET6,
821 SOCK_RAW, IPPROTO_ICMPV6, net); 823 SOCK_RAW, IPPROTO_ICMPV6, net);
822 if (err < 0) { 824 if (err < 0) {
823 printk(KERN_ERR 825 pr_err("Failed to initialize the ICMP6 control socket (err %d)\n",
824 "Failed to initialize the ICMP6 control socket "
825 "(err %d).\n",
826 err); 826 err);
827 goto fail; 827 goto fail;
828 } 828 }
@@ -881,7 +881,7 @@ int __init icmpv6_init(void)
881 return 0; 881 return 0;
882 882
883fail: 883fail:
884 printk(KERN_ERR "Failed to register ICMP6 protocol\n"); 884 pr_err("Failed to register ICMP6 protocol\n");
885 unregister_pernet_subsys(&icmpv6_sk_ops); 885 unregister_pernet_subsys(&icmpv6_sk_ops);
886 return err; 886 return err;
887} 887}
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 93717435013e..e9846da77424 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -18,6 +18,9 @@
18 * routing table. 18 * routing table.
19 * Ville Nuorvala: Fixed routing subtrees. 19 * Ville Nuorvala: Fixed routing subtrees.
20 */ 20 */
21
22#define pr_fmt(fmt) "IPv6: " fmt
23
21#include <linux/errno.h> 24#include <linux/errno.h>
22#include <linux/types.h> 25#include <linux/types.h>
23#include <linux/net.h> 26#include <linux/net.h>
@@ -451,12 +454,10 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
451 !ipv6_prefix_equal(&key->addr, addr, fn->fn_bit)) { 454 !ipv6_prefix_equal(&key->addr, addr, fn->fn_bit)) {
452 if (!allow_create) { 455 if (!allow_create) {
453 if (replace_required) { 456 if (replace_required) {
454 pr_warn("IPv6: Can't replace route, " 457 pr_warn("Can't replace route, no match found\n");
455 "no match found\n");
456 return ERR_PTR(-ENOENT); 458 return ERR_PTR(-ENOENT);
457 } 459 }
458 pr_warn("IPv6: NLM_F_CREATE should be set " 460 pr_warn("NLM_F_CREATE should be set when creating new route\n");
459 "when creating new route\n");
460 } 461 }
461 goto insert_above; 462 goto insert_above;
462 } 463 }
@@ -499,11 +500,10 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
499 * That would keep IPv6 consistent with IPv4 500 * That would keep IPv6 consistent with IPv4
500 */ 501 */
501 if (replace_required) { 502 if (replace_required) {
502 pr_warn("IPv6: Can't replace route, no match found\n"); 503 pr_warn("Can't replace route, no match found\n");
503 return ERR_PTR(-ENOENT); 504 return ERR_PTR(-ENOENT);
504 } 505 }
505 pr_warn("IPv6: NLM_F_CREATE should be set " 506 pr_warn("NLM_F_CREATE should be set when creating new route\n");
506 "when creating new route\n");
507 } 507 }
508 /* 508 /*
509 * We walked to the bottom of tree. 509 * We walked to the bottom of tree.
@@ -696,7 +696,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
696 */ 696 */
697 if (!replace) { 697 if (!replace) {
698 if (!add) 698 if (!add)
699 pr_warn("IPv6: NLM_F_CREATE should be set when creating new route\n"); 699 pr_warn("NLM_F_CREATE should be set when creating new route\n");
700 700
701add: 701add:
702 rt->dst.rt6_next = iter; 702 rt->dst.rt6_next = iter;
@@ -715,7 +715,7 @@ add:
715 if (!found) { 715 if (!found) {
716 if (add) 716 if (add)
717 goto add; 717 goto add;
718 pr_warn("IPv6: NLM_F_REPLACE set, but no existing node found!\n"); 718 pr_warn("NLM_F_REPLACE set, but no existing node found!\n");
719 return -ENOENT; 719 return -ENOENT;
720 } 720 }
721 *ins = rt; 721 *ins = rt;
@@ -768,7 +768,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
768 replace_required = 1; 768 replace_required = 1;
769 } 769 }
770 if (!allow_create && !replace_required) 770 if (!allow_create && !replace_required)
771 pr_warn("IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE\n"); 771 pr_warn("RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE\n");
772 772
773 fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr), 773 fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr),
774 rt->rt6i_dst.plen, offsetof(struct rt6_info, rt6i_dst), 774 rt->rt6i_dst.plen, offsetof(struct rt6_info, rt6i_dst),
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 27fec272d39d..7962b3d42673 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -18,6 +18,8 @@
18 * 18 *
19 */ 19 */
20 20
21#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
22
21#include <linux/module.h> 23#include <linux/module.h>
22#include <linux/capability.h> 24#include <linux/capability.h>
23#include <linux/errno.h> 25#include <linux/errno.h>
@@ -836,15 +838,12 @@ static inline int ip6_tnl_xmit_ctl(struct ip6_tnl *t)
836 ldev = dev_get_by_index_rcu(net, p->link); 838 ldev = dev_get_by_index_rcu(net, p->link);
837 839
838 if (unlikely(!ipv6_chk_addr(net, &p->laddr, ldev, 0))) 840 if (unlikely(!ipv6_chk_addr(net, &p->laddr, ldev, 0)))
839 printk(KERN_WARNING 841 pr_warn("%s xmit: Local address not yet configured!\n",
840 "%s xmit: Local address not yet configured!\n", 842 p->name);
841 p->name);
842 else if (!ipv6_addr_is_multicast(&p->raddr) && 843 else if (!ipv6_addr_is_multicast(&p->raddr) &&
843 unlikely(ipv6_chk_addr(net, &p->raddr, NULL, 0))) 844 unlikely(ipv6_chk_addr(net, &p->raddr, NULL, 0)))
844 printk(KERN_WARNING 845 pr_warn("%s xmit: Routing loop! Remote address found on this node!\n",
845 "%s xmit: Routing loop! " 846 p->name);
846 "Remote address found on this node!\n",
847 p->name);
848 else 847 else
849 ret = 1; 848 ret = 1;
850 rcu_read_unlock(); 849 rcu_read_unlock();
@@ -1542,13 +1541,13 @@ static int __init ip6_tunnel_init(void)
1542 1541
1543 err = xfrm6_tunnel_register(&ip4ip6_handler, AF_INET); 1542 err = xfrm6_tunnel_register(&ip4ip6_handler, AF_INET);
1544 if (err < 0) { 1543 if (err < 0) {
1545 printk(KERN_ERR "ip6_tunnel init: can't register ip4ip6\n"); 1544 pr_err("%s: can't register ip4ip6\n", __func__);
1546 goto out_ip4ip6; 1545 goto out_ip4ip6;
1547 } 1546 }
1548 1547
1549 err = xfrm6_tunnel_register(&ip6ip6_handler, AF_INET6); 1548 err = xfrm6_tunnel_register(&ip6ip6_handler, AF_INET6);
1550 if (err < 0) { 1549 if (err < 0) {
1551 printk(KERN_ERR "ip6_tunnel init: can't register ip6ip6\n"); 1550 pr_err("%s: can't register ip6ip6\n", __func__);
1552 goto out_ip6ip6; 1551 goto out_ip6ip6;
1553 } 1552 }
1554 1553
@@ -1569,10 +1568,10 @@ out_pernet:
1569static void __exit ip6_tunnel_cleanup(void) 1568static void __exit ip6_tunnel_cleanup(void)
1570{ 1569{
1571 if (xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET)) 1570 if (xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET))
1572 printk(KERN_INFO "ip6_tunnel close: can't deregister ip4ip6\n"); 1571 pr_info("%s: can't deregister ip4ip6\n", __func__);
1573 1572
1574 if (xfrm6_tunnel_deregister(&ip6ip6_handler, AF_INET6)) 1573 if (xfrm6_tunnel_deregister(&ip6ip6_handler, AF_INET6))
1575 printk(KERN_INFO "ip6_tunnel close: can't deregister ip6ip6\n"); 1574 pr_info("%s: can't deregister ip6ip6\n", __func__);
1576 1575
1577 unregister_pernet_device(&ip6_tnl_net_ops); 1576 unregister_pernet_device(&ip6_tnl_net_ops);
1578} 1577}
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index ba936e18b61b..b15dc08643a4 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1350,7 +1350,7 @@ int __init ip6_mr_init(void)
1350 goto reg_notif_fail; 1350 goto reg_notif_fail;
1351#ifdef CONFIG_IPV6_PIMSM_V2 1351#ifdef CONFIG_IPV6_PIMSM_V2
1352 if (inet6_add_protocol(&pim6_protocol, IPPROTO_PIM) < 0) { 1352 if (inet6_add_protocol(&pim6_protocol, IPPROTO_PIM) < 0) {
1353 printk(KERN_ERR "ip6_mr_init: can't add PIM protocol\n"); 1353 pr_err("%s: can't add PIM protocol\n", __func__);
1354 err = -EAGAIN; 1354 err = -EAGAIN;
1355 goto add_proto_fail; 1355 goto add_proto_fail;
1356 } 1356 }
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index bba658d9a03c..1addba5b8b39 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -30,6 +30,9 @@
30 * The decompression of IP datagram MUST be done after the reassembly, 30 * The decompression of IP datagram MUST be done after the reassembly,
31 * AH/ESP processing. 31 * AH/ESP processing.
32 */ 32 */
33
34#define pr_fmt(fmt) "IPv6: " fmt
35
33#include <linux/module.h> 36#include <linux/module.h>
34#include <net/ip.h> 37#include <net/ip.h>
35#include <net/xfrm.h> 38#include <net/xfrm.h>
@@ -190,11 +193,11 @@ static const struct inet6_protocol ipcomp6_protocol =
190static int __init ipcomp6_init(void) 193static int __init ipcomp6_init(void)
191{ 194{
192 if (xfrm_register_type(&ipcomp6_type, AF_INET6) < 0) { 195 if (xfrm_register_type(&ipcomp6_type, AF_INET6) < 0) {
193 printk(KERN_INFO "ipcomp6 init: can't add xfrm type\n"); 196 pr_info("%s: can't add xfrm type\n", __func__);
194 return -EAGAIN; 197 return -EAGAIN;
195 } 198 }
196 if (inet6_add_protocol(&ipcomp6_protocol, IPPROTO_COMP) < 0) { 199 if (inet6_add_protocol(&ipcomp6_protocol, IPPROTO_COMP) < 0) {
197 printk(KERN_INFO "ipcomp6 init: can't add protocol\n"); 200 pr_info("%s: can't add protocol\n", __func__);
198 xfrm_unregister_type(&ipcomp6_type, AF_INET6); 201 xfrm_unregister_type(&ipcomp6_type, AF_INET6);
199 return -EAGAIN; 202 return -EAGAIN;
200 } 203 }
@@ -204,9 +207,9 @@ static int __init ipcomp6_init(void)
204static void __exit ipcomp6_fini(void) 207static void __exit ipcomp6_fini(void)
205{ 208{
206 if (inet6_del_protocol(&ipcomp6_protocol, IPPROTO_COMP) < 0) 209 if (inet6_del_protocol(&ipcomp6_protocol, IPPROTO_COMP) < 0)
207 printk(KERN_INFO "ipv6 ipcomp close: can't remove protocol\n"); 210 pr_info("%s: can't remove protocol\n", __func__);
208 if (xfrm_unregister_type(&ipcomp6_type, AF_INET6) < 0) 211 if (xfrm_unregister_type(&ipcomp6_type, AF_INET6) < 0)
209 printk(KERN_INFO "ipv6 ipcomp close: can't remove xfrm type\n"); 212 pr_info("%s: can't remove xfrm type\n", __func__);
210} 213}
211 214
212module_init(ipcomp6_init); 215module_init(ipcomp6_init);
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 7dfb89f2bae5..2a3a22cf7604 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2627,8 +2627,7 @@ static int __net_init igmp6_net_init(struct net *net)
2627 err = inet_ctl_sock_create(&net->ipv6.igmp_sk, PF_INET6, 2627 err = inet_ctl_sock_create(&net->ipv6.igmp_sk, PF_INET6,
2628 SOCK_RAW, IPPROTO_ICMPV6, net); 2628 SOCK_RAW, IPPROTO_ICMPV6, net);
2629 if (err < 0) { 2629 if (err < 0) {
2630 printk(KERN_ERR 2630 pr_err("Failed to initialize the IGMP6 control socket (err %d)\n",
2631 "Failed to initialize the IGMP6 control socket (err %d).\n",
2632 err); 2631 err);
2633 goto out; 2632 goto out;
2634 } 2633 }
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,
307static int mip6_destopt_init_state(struct xfrm_state *x) 309static 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,
443static int mip6_rthdr_init_state(struct xfrm_state *x) 444static 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
482static int __init mip6_init(void) 482static 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)
510static void __exit mip6_fini(void) 510static 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
520module_init(mip6_init); 520module_init(mip6_init);
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 35615c6358b8..511e5b4bb610 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -266,7 +266,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
266 case ND_OPT_REDIRECT_HDR: 266 case ND_OPT_REDIRECT_HDR:
267 if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { 267 if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
268 ND_PRINTK2(KERN_WARNING 268 ND_PRINTK2(KERN_WARNING
269 "%s(): duplicated ND6 option found: type=%d\n", 269 "%s: duplicated ND6 option found: type=%d\n",
270 __func__, 270 __func__,
271 nd_opt->nd_opt_type); 271 nd_opt->nd_opt_type);
272 } else { 272 } else {
@@ -297,7 +297,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
297 * protocol. 297 * protocol.
298 */ 298 */
299 ND_PRINTK2(KERN_NOTICE 299 ND_PRINTK2(KERN_NOTICE
300 "%s(): ignored unsupported option; type=%d, len=%d\n", 300 "%s: ignored unsupported option; type=%d, len=%d\n",
301 __func__, 301 __func__,
302 nd_opt->nd_opt_type, nd_opt->nd_opt_len); 302 nd_opt->nd_opt_type, nd_opt->nd_opt_len);
303 } 303 }
@@ -459,7 +459,7 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,
459 1, &err); 459 1, &err);
460 if (!skb) { 460 if (!skb) {
461 ND_PRINTK0(KERN_ERR 461 ND_PRINTK0(KERN_ERR
462 "ICMPv6 ND: %s() failed to allocate an skb, err=%d.\n", 462 "ICMPv6 ND: %s failed to allocate an skb, err=%d.\n",
463 __func__, err); 463 __func__, err);
464 return NULL; 464 return NULL;
465 } 465 }
@@ -696,7 +696,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
696 696
697 if ((probes -= neigh->parms->ucast_probes) < 0) { 697 if ((probes -= neigh->parms->ucast_probes) < 0) {
698 if (!(neigh->nud_state & NUD_VALID)) { 698 if (!(neigh->nud_state & NUD_VALID)) {
699 ND_PRINTK1(KERN_DEBUG "%s(): trying to ucast probe in NUD_INVALID: %pI6\n", 699 ND_PRINTK1(KERN_DEBUG "%s: trying to ucast probe in NUD_INVALID: %pI6\n",
700 __func__, target); 700 __func__, target);
701 } 701 }
702 ndisc_send_ns(dev, neigh, target, target, saddr); 702 ndisc_send_ns(dev, neigh, target, target, saddr);
@@ -1230,7 +1230,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1230 neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr); 1230 neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr);
1231 if (!neigh) { 1231 if (!neigh) {
1232 ND_PRINTK0(KERN_ERR 1232 ND_PRINTK0(KERN_ERR
1233 "ICMPv6 RA: %s() got default router without neighbour.\n", 1233 "ICMPv6 RA: %s got default router without neighbour.\n",
1234 __func__); 1234 __func__);
1235 dst_release(&rt->dst); 1235 dst_release(&rt->dst);
1236 return; 1236 return;
@@ -1248,7 +1248,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1248 rt = rt6_add_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev, pref); 1248 rt = rt6_add_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev, pref);
1249 if (rt == NULL) { 1249 if (rt == NULL) {
1250 ND_PRINTK0(KERN_ERR 1250 ND_PRINTK0(KERN_ERR
1251 "ICMPv6 RA: %s() failed to add default route.\n", 1251 "ICMPv6 RA: %s failed to add default route.\n",
1252 __func__); 1252 __func__);
1253 return; 1253 return;
1254 } 1254 }
@@ -1256,7 +1256,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1256 neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr); 1256 neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr);
1257 if (neigh == NULL) { 1257 if (neigh == NULL) {
1258 ND_PRINTK0(KERN_ERR 1258 ND_PRINTK0(KERN_ERR
1259 "ICMPv6 RA: %s() got default router without neighbour.\n", 1259 "ICMPv6 RA: %s got default router without neighbour.\n",
1260 __func__); 1260 __func__);
1261 dst_release(&rt->dst); 1261 dst_release(&rt->dst);
1262 return; 1262 return;
@@ -1605,7 +1605,7 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
1605 1, &err); 1605 1, &err);
1606 if (buff == NULL) { 1606 if (buff == NULL) {
1607 ND_PRINTK0(KERN_ERR 1607 ND_PRINTK0(KERN_ERR
1608 "ICMPv6 Redirect: %s() failed to allocate an skb, err=%d.\n", 1608 "ICMPv6 Redirect: %s failed to allocate an skb, err=%d.\n",
1609 __func__, err); 1609 __func__, err);
1610 goto release; 1610 goto release;
1611 } 1611 }
@@ -1767,11 +1767,7 @@ static void ndisc_warn_deprecated_sysctl(struct ctl_table *ctl,
1767 static int warned; 1767 static int warned;
1768 if (strcmp(warncomm, current->comm) && warned < 5) { 1768 if (strcmp(warncomm, current->comm) && warned < 5) {
1769 strcpy(warncomm, current->comm); 1769 strcpy(warncomm, current->comm);
1770 printk(KERN_WARNING 1770 pr_warn("process `%s' is using deprecated sysctl (%s) net.ipv6.neigh.%s.%s - use net.ipv6.neigh.%s.%s_ms instead\n",
1771 "process `%s' is using deprecated sysctl (%s) "
1772 "net.ipv6.neigh.%s.%s; "
1773 "Use net.ipv6.neigh.%s.%s_ms "
1774 "instead.\n",
1775 warncomm, func, 1771 warncomm, func,
1776 dev_name, ctl->procname, 1772 dev_name, ctl->procname,
1777 dev_name, ctl->procname); 1773 dev_name, ctl->procname);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e20e32069024..90119a32b89d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -24,6 +24,8 @@
24 * Fixed routing subtrees. 24 * Fixed routing subtrees.
25 */ 25 */
26 26
27#define pr_fmt(fmt) "IPv6: " fmt
28
27#include <linux/capability.h> 29#include <linux/capability.h>
28#include <linux/errno.h> 30#include <linux/errno.h>
29#include <linux/export.h> 31#include <linux/export.h>
@@ -794,7 +796,7 @@ static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort,
794 goto retry; 796 goto retry;
795 } 797 }
796 798
797 net_warn_ratelimited("ipv6: Neighbour table overflow\n"); 799 net_warn_ratelimited("Neighbour table overflow\n");
798 dst_free(&rt->dst); 800 dst_free(&rt->dst);
799 return NULL; 801 return NULL;
800 } 802 }
@@ -1280,7 +1282,7 @@ int ip6_route_add(struct fib6_config *cfg)
1280 !(cfg->fc_nlinfo.nlh->nlmsg_flags & NLM_F_CREATE)) { 1282 !(cfg->fc_nlinfo.nlh->nlmsg_flags & NLM_F_CREATE)) {
1281 table = fib6_get_table(net, cfg->fc_table); 1283 table = fib6_get_table(net, cfg->fc_table);
1282 if (!table) { 1284 if (!table) {
1283 printk(KERN_WARNING "IPv6: NLM_F_CREATE should be specified when creating new route\n"); 1285 pr_warn("NLM_F_CREATE should be specified when creating new route\n");
1284 table = fib6_new_table(net, cfg->fc_table); 1286 table = fib6_new_table(net, cfg->fc_table);
1285 } 1287 }
1286 } else { 1288 } else {
@@ -2102,7 +2104,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
2102 int err; 2104 int err;
2103 2105
2104 if (!rt) { 2106 if (!rt) {
2105 net_warn_ratelimited("IPv6: Maximum number of routes reached, consider increasing route/max_size\n"); 2107 net_warn_ratelimited("Maximum number of routes reached, consider increasing route/max_size\n");
2106 return ERR_PTR(-ENOMEM); 2108 return ERR_PTR(-ENOMEM);
2107 } 2109 }
2108 2110
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index a36a09701bff..60415711563f 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -17,6 +17,8 @@
17 * Fred Templin <fred.l.templin@boeing.com>: isatap support 17 * Fred Templin <fred.l.templin@boeing.com>: isatap support
18 */ 18 */
19 19
20#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
21
20#include <linux/module.h> 22#include <linux/module.h>
21#include <linux/capability.h> 23#include <linux/capability.h>
22#include <linux/errno.h> 24#include <linux/errno.h>
@@ -1301,7 +1303,7 @@ static int __init sit_init(void)
1301{ 1303{
1302 int err; 1304 int err;
1303 1305
1304 printk(KERN_INFO "IPv6 over IPv4 tunneling driver\n"); 1306 pr_info("IPv6 over IPv4 tunneling driver\n");
1305 1307
1306 err = register_pernet_device(&sit_net_ops); 1308 err = register_pernet_device(&sit_net_ops);
1307 if (err < 0) 1309 if (err < 0)
@@ -1309,7 +1311,7 @@ static int __init sit_init(void)
1309 err = xfrm4_tunnel_register(&sit_handler, AF_INET6); 1311 err = xfrm4_tunnel_register(&sit_handler, AF_INET6);
1310 if (err < 0) { 1312 if (err < 0) {
1311 unregister_pernet_device(&sit_net_ops); 1313 unregister_pernet_device(&sit_net_ops);
1312 printk(KERN_INFO "sit init: Can't add protocol\n"); 1314 pr_info("%s: can't add protocol\n", __func__);
1313 } 1315 }
1314 return err; 1316 return err;
1315} 1317}
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c
index 4f3cec12aa85..4b0f50d9a962 100644
--- a/net/ipv6/tunnel6.c
+++ b/net/ipv6/tunnel6.c
@@ -19,6 +19,8 @@
19 * YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> 19 * YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
20 */ 20 */
21 21
22#define pr_fmt(fmt) "IPv6: " fmt
23
22#include <linux/icmpv6.h> 24#include <linux/icmpv6.h>
23#include <linux/init.h> 25#include <linux/init.h>
24#include <linux/module.h> 26#include <linux/module.h>
@@ -160,11 +162,11 @@ static const struct inet6_protocol tunnel46_protocol = {
160static int __init tunnel6_init(void) 162static int __init tunnel6_init(void)
161{ 163{
162 if (inet6_add_protocol(&tunnel6_protocol, IPPROTO_IPV6)) { 164 if (inet6_add_protocol(&tunnel6_protocol, IPPROTO_IPV6)) {
163 printk(KERN_ERR "tunnel6 init(): can't add protocol\n"); 165 pr_err("%s: can't add protocol\n", __func__);
164 return -EAGAIN; 166 return -EAGAIN;
165 } 167 }
166 if (inet6_add_protocol(&tunnel46_protocol, IPPROTO_IPIP)) { 168 if (inet6_add_protocol(&tunnel46_protocol, IPPROTO_IPIP)) {
167 printk(KERN_ERR "tunnel6 init(): can't add protocol\n"); 169 pr_err("%s: can't add protocol\n", __func__);
168 inet6_del_protocol(&tunnel6_protocol, IPPROTO_IPV6); 170 inet6_del_protocol(&tunnel6_protocol, IPPROTO_IPV6);
169 return -EAGAIN; 171 return -EAGAIN;
170 } 172 }
@@ -174,9 +176,9 @@ static int __init tunnel6_init(void)
174static void __exit tunnel6_fini(void) 176static void __exit tunnel6_fini(void)
175{ 177{
176 if (inet6_del_protocol(&tunnel46_protocol, IPPROTO_IPIP)) 178 if (inet6_del_protocol(&tunnel46_protocol, IPPROTO_IPIP))
177 printk(KERN_ERR "tunnel6 close: can't remove protocol\n"); 179 pr_err("%s: can't remove protocol\n", __func__);
178 if (inet6_del_protocol(&tunnel6_protocol, IPPROTO_IPV6)) 180 if (inet6_del_protocol(&tunnel6_protocol, IPPROTO_IPV6))
179 printk(KERN_ERR "tunnel6 close: can't remove protocol\n"); 181 pr_err("%s: can't remove protocol\n", __func__);
180} 182}
181 183
182module_init(tunnel6_init); 184module_init(tunnel6_init);