lkml.org 
[lkml]   [2020]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver
Date
It was <2020-08-26 śro 09:13>, when Geert Uytterhoeven wrote:
> On Tue, Aug 25, 2020 at 8:02 PM Andrew Lunn <andrew@lunn.ch> 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().

It is good to know.

Actually I think printe_hex_dump(KERN_INFO) is here more
appropriate. With *_debug() functions and dynamic debug enabled users
need to flip two switches to see messages. I think that if msglvl
(pktdata in this case) is not turned on by default and users need to use
ethtool to switch it, they shouldn't be required to fiddle with dynamic
debug too.

--
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-09-07 19:47    [W:0.110 / U:4.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site