From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2] net: phy: Have __phy_modify return 0 on success Date: Mon, 15 Jan 2018 12:50:13 -0500 (EST) Message-ID: <20180115.125013.1494098943775766238.davem@davemloft.net> References: <1515765696-1286-1-git-send-email-andrew@lunn.ch> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: geert@linux-m68k.org, niklas.cassel@axis.com, rmk+kernel@arm.linux.org.uk, f.fainelli@gmail.com, netdev@vger.kernel.org To: andrew@lunn.ch Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:49144 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751118AbeAORuS (ORCPT ); Mon, 15 Jan 2018 12:50:18 -0500 In-Reply-To: <1515765696-1286-1-git-send-email-andrew@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: From: Andrew Lunn Date: Fri, 12 Jan 2018 15:01:36 +0100 > __phy_modify would return the old value of the register before it was > modified. Thus on success, it does not return 0, but a positive value. > Thus functions using phy_modify, which is a wrapper around > __phy_modify, can start returning > 0 on success, rather than 0. As a > result, breakage has been noticed in various places, where 0 was > assumed. > > Code inspection does not find any current location where the return of > the old value is currently used. So have __phy_modify return 0 on > success. When there is a real need for the old value, either a new > accessor can be added, or an additional parameter passed. > > Fixes: fea23fb591cc ("net: phy: convert read-modify-write to phy_modify()") > Fixes: 2b74e5be17d2 ("net: phy: add phy_modify() accessor") > Reported-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven > Signed-off-by: Andrew Lunn > --- > v2: space before : > additional fixes tag > Tested-by Applied to net-next, thanks Andrew.