Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752183AbdCNOTE (ORCPT ); Tue, 14 Mar 2017 10:19:04 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:47481 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbdCNOTB (ORCPT ); Tue, 14 Mar 2017 10:19:01 -0400 Date: Tue, 14 Mar 2017 15:18:56 +0100 From: Andrew Lunn To: Vivien Didelot Cc: Matthias May , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Jason Cobham Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time Message-ID: <20170314141856.GG14183@lunn.ch> References: <20170313192043.12478-1-vivien.didelot@savoirfairelinux.com> <20170313223932.GC14183@lunn.ch> <20170313225845.GE14183@lunn.ch> <535be006-e384-aca3-ee8b-4ed36b66b97a@neratec.com> <20170314120539.GT15842@lunn.ch> <87inncj71i.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87inncj71i.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 31 On Tue, Mar 14, 2017 at 09:56:41AM -0400, Vivien Didelot wrote: > Hi Andrew, > > Andrew Lunn writes: > > >> The never ever seeing R/W failure on MDIO bus is not exactly accurate. > >> We had with art (atheros calibration tool) the problem that interrupts > >> were being disabled which lead to MDIO operations running into > >> timout/failing. > > > > Yes, i've seen similar with power management bugs for the MDIO > > driver. But you get a cascade of failures, lots of warnings and error > > prints, it is clear something bad has happened, and the switch is in > > an inconsistent state. So having one more debug print which is also > > inconsistent does no really harm. > > > > Anyway, this whole conversation has taken more effort than just making > > this simple change to remove a few lines of code. So lets drop it and > > move on. > > I don't understand nor agree with the fact that sometimes it's OK to not > check for errors, based on one developer assumptions. Not checking > return code is wrong and very likely error-prone. Please go back and look what i said. I did check the error code, in that it gets returned to the caller. I just don't check it before printing the debug. But as i said, lets drop this whole topic. Andrew