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/tunnel6.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/tunnel6.c')
-rw-r--r-- | net/ipv6/tunnel6.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 = { | |||
160 | static int __init tunnel6_init(void) | 162 | static 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) | |||
174 | static void __exit tunnel6_fini(void) | 176 | static 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 | ||
182 | module_init(tunnel6_init); | 184 | module_init(tunnel6_init); |