Skip to content

Commit

Permalink
qlcnic: Fix dump_skb output
Browse files Browse the repository at this point in the history
Use normal facilities to avoid printing each byte
on a separate line.

Now emits at KERN_DEBUG instead of KERN_INFO.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Jan 5, 2015
1 parent 3f255dc commit 3620af0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <net/ip.h>
#include <linux/ipv6.h>
#include <net/checksum.h>
#include <linux/printk.h>

#include "qlcnic.h"

Expand Down Expand Up @@ -1465,14 +1466,14 @@ void qlcnic_post_rx_buffers(struct qlcnic_adapter *adapter,

static void dump_skb(struct sk_buff *skb, struct qlcnic_adapter *adapter)
{
int i;
unsigned char *data = skb->data;

pr_info(KERN_INFO "\n");
for (i = 0; i < skb->len; i++) {
QLCDB(adapter, DRV, "%02x ", data[i]);
if ((i & 0x0f) == 8)
pr_info(KERN_INFO "\n");
if (adapter->ahw->msg_enable & NETIF_MSG_DRV) {
char prefix[30];

scnprintf(prefix, sizeof(prefix), "%s: %s: ",
dev_name(&adapter->pdev->dev), __func__);

print_hex_dump_debug(prefix, DUMP_PREFIX_NONE, 16, 1,
skb->data, skb->len, true);
}
}

Expand Down

0 comments on commit 3620af0

Please sign in to comment.