Skip to content

Commit

Permalink
stmmac: remove custom implementation of print_hex_dump()
Browse files Browse the repository at this point in the history
There is a kernel helper to dump buffers in a hexdecimal format. This patch
substitutes the open coded function by calling that helper.

The output is slightly changed:
 - no lead space
 - ASCII part will be printed along with the dump
 - offset is longer than 3 characters (now 8)

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Nov 7, 2014
1 parent 7f6d467 commit 424c4f7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,8 @@ static void stmmac_clk_csr_set(struct stmmac_priv *priv)

static void print_pkt(unsigned char *buf, int len)
{
int j;
pr_debug("len = %d byte, buf addr: 0x%p", len, buf);
for (j = 0; j < len; j++) {
if ((j % 16) == 0)
pr_debug("\n %03x:", j);
pr_debug(" %02x", buf[j]);
}
pr_debug("\n");
pr_debug("len = %d byte, buf addr: 0x%p\n", len, buf);
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
}

/* minimum number of free TX descriptors required to wake up TX process */
Expand Down

0 comments on commit 424c4f7

Please sign in to comment.