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>
This commit is contained in:

committed by
David S. Miller

parent
028940342a
commit
a4ca44fa57
@@ -9,6 +9,8 @@
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/socket.h>
|
||||
@@ -115,21 +117,14 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb,
|
||||
|
||||
if (session->debug & L2TP_MSG_DATA) {
|
||||
unsigned int length;
|
||||
int offset;
|
||||
u8 *ptr = skb->data;
|
||||
|
||||
length = min(32u, skb->len);
|
||||
if (!pskb_may_pull(skb, length))
|
||||
goto error;
|
||||
|
||||
printk(KERN_DEBUG "%s: eth recv: ", session->name);
|
||||
|
||||
offset = 0;
|
||||
do {
|
||||
printk(" %02X", ptr[offset]);
|
||||
} while (++offset < length);
|
||||
|
||||
printk("\n");
|
||||
pr_debug("%s: eth recv\n", session->name);
|
||||
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, ptr, length);
|
||||
}
|
||||
|
||||
if (!pskb_may_pull(skb, sizeof(ETH_HLEN)))
|
||||
@@ -308,7 +303,7 @@ static int __init l2tp_eth_init(void)
|
||||
if (err)
|
||||
goto out_unreg;
|
||||
|
||||
printk(KERN_INFO "L2TP ethernet pseudowire support (L2TPv3)\n");
|
||||
pr_info("L2TP ethernet pseudowire support (L2TPv3)\n");
|
||||
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user