Re: [PATCH 1/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

From: Geert Uytterhoeven
Date: Wed Aug 26 2020 - 03:13:32 EST


On Tue, Aug 25, 2020 at 8:02 PM Andrew Lunn <andrew@xxxxxxx> wrote:
> On Tue, Aug 25, 2020 at 07:03:09PM +0200, Łukasz Stelmach wrote:
> > + if (netif_msg_pktdata(ax_local)) {
> > + int loop;
> > + netdev_info(ndev, "TX packet len %d, total len %d, seq %d\n",
> > + pkt_len, tx_skb->len, seq_num);
> > +
> > + netdev_info(ndev, " Dump SPI Header:\n ");
> > + for (loop = 0; loop < 4; loop++)
> > + netdev_info(ndev, "%02x ", *(tx_skb->data + loop));
> > +
> > + netdev_info(ndev, "\n");
>
> This no longer works as far as i remember. Lines are terminate by
> default even if they don't have a \n.
>
> Please you should not be using netdev_info(). netdev_dbg() please.

We have a nice helper for this: print_hex_dump_debug().

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds