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/ip6_tunnel.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/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 21 |
1 files changed, 10 insertions, 11 deletions
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: | |||
1569 | static void __exit ip6_tunnel_cleanup(void) | 1568 | static 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 | } |