From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH] net: phy: sftp: print debug message with text, not numbers Date: Wed, 8 Aug 2018 21:18:22 +0200 Message-ID: <20180808191822.GA1813@lunn.ch> References: <1533754452-1633-1-git-send-email-andrew@lunn.ch> <6f042c52-fdc9-c90c-82ab-2a7b38c04583@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , netdev , Russell King To: Florian Fainelli Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:59044 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727295AbeHHVja (ORCPT ); Wed, 8 Aug 2018 17:39:30 -0400 Content-Disposition: inline In-Reply-To: <6f042c52-fdc9-c90c-82ab-2a7b38c04583@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Aug 08, 2018 at 12:02:56PM -0700, Florian Fainelli wrote: > On 08/08/2018 11:54 AM, Andrew Lunn wrote: > > Convert the state numbers, device state, etc from numbers to strings > > when printing debug messages. > > I had a similar patch locally that I used for initial troubleshooting, > which I might even have shared with Russell at some point, though now I > can't remember if he was okay or not with the idea. This is much more > readable IMHO so: Yes, I should of included an example: [ 87.359862] sfp sff3: SM: enter present:down:down event dev_up [ 87.359875] sfp sff3: tx disable 1 -> 0 [ 87.359900] sfp sff3: SM: exit present:up:init [ 87.360099] IPv6: ADDRCONF(NETDEV_UP): sff3: link is not ready [ 87.661662] sfp sff3: SM: enter present:up:init event timeout [ 87.661697] sfp sff3: SM: exit present:up:link_up [ 87.661827] mv88e6085 0.2:00 sff3: Link is Up - 1Gbps/Full - flow control off Andrew