aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_ip6.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-05-16 05:55:56 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-17 04:34:38 -0400
commita4ca44fa578c7c7fd123b7fba3c2c98d4ba4e53d (patch)
tree58be0839a0c08ee8eaff4fac160dfb70b6982a70 /net/l2tp/l2tp_ip6.c
parent028940342a906db8da014a7603a0deddc2c323dd (diff)
net: l2tp: Standardize logging styles
Use more current logging styles. Add pr_fmt to prefix output appropriately. Convert printks to pr_<level>. Convert PRINTK macros to new l2tp_<level> macros. Neaten some <foo>_refcount debugging macros. Use print_hex_dump_bytes instead of hand-coded loops. Coalesce formats and align arguments. Some KERN_DEBUG output is not now emitted unless dynamic_debugging is enabled. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_ip6.c')
-rw-r--r--net/l2tp/l2tp_ip6.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 88f0abe35443..0291d8d85f30 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -9,6 +9,8 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13
12#include <linux/icmp.h> 14#include <linux/icmp.h>
13#include <linux/module.h> 15#include <linux/module.h>
14#include <linux/skbuff.h> 16#include <linux/skbuff.h>
@@ -133,7 +135,6 @@ static int l2tp_ip6_recv(struct sk_buff *skb)
133 struct l2tp_session *session; 135 struct l2tp_session *session;
134 struct l2tp_tunnel *tunnel = NULL; 136 struct l2tp_tunnel *tunnel = NULL;
135 int length; 137 int length;
136 int offset;
137 138
138 /* Point to L2TP header */ 139 /* Point to L2TP header */
139 optr = ptr = skb->data; 140 optr = ptr = skb->data;
@@ -168,14 +169,8 @@ static int l2tp_ip6_recv(struct sk_buff *skb)
168 if (!pskb_may_pull(skb, length)) 169 if (!pskb_may_pull(skb, length))
169 goto discard; 170 goto discard;
170 171
171 printk(KERN_DEBUG "%s: ip recv: ", tunnel->name); 172 pr_debug("%s: ip recv\n", tunnel->name);
172 173 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, ptr, length);
173 offset = 0;
174 do {
175 printk(" %02X", ptr[offset]);
176 } while (++offset < length);
177
178 printk("\n");
179 } 174 }
180 175
181 l2tp_recv_common(session, skb, ptr, optr, 0, skb->len, 176 l2tp_recv_common(session, skb, ptr, optr, 0, skb->len,
@@ -752,7 +747,7 @@ static int __init l2tp_ip6_init(void)
752{ 747{
753 int err; 748 int err;
754 749
755 printk(KERN_INFO "L2TP IP encapsulation support for IPv6 (L2TPv3)\n"); 750 pr_info("L2TP IP encapsulation support for IPv6 (L2TPv3)\n");
756 751
757 err = proto_register(&l2tp_ip6_prot, 1); 752 err = proto_register(&l2tp_ip6_prot, 1);
758 if (err != 0) 753 if (err != 0)