Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread Florian Fainelli
On 01/11/2018 07:48 AM, David Miller wrote: > From: Geert Uytterhoeven > Date: Tue, 9 Jan 2018 12:11:21 +0100 > >> In case of success, the return values of (__)phy_write() and >> (__)phy_modify() are not compatible: (__)phy_write() returns 0, while >> (__)phy_modify()

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread Andrew Lunn
> Sorry, the phy_restore_page() semantics are driving me crazy. > Let's revert. I will try to take a look today. Andrew

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread Russell King - ARM Linux
On Thu, Jan 11, 2018 at 05:00:03PM +0100, Geert Uytterhoeven wrote: > On Thu, Jan 11, 2018 at 4:54 PM, Geert Uytterhoeven > wrote: > > On Thu, Jan 11, 2018 at 4:53 PM, Russell King - ARM Linux > > wrote: > >> On Thu, Jan 11, 2018 at 10:48:35AM -0500,

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread Geert Uytterhoeven
On Thu, Jan 11, 2018 at 4:54 PM, Geert Uytterhoeven wrote: > On Thu, Jan 11, 2018 at 4:53 PM, Russell King - ARM Linux > wrote: >> On Thu, Jan 11, 2018 at 10:48:35AM -0500, David Miller wrote: >>> From: Geert Uytterhoeven >>>

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread Russell King - ARM Linux
On Thu, Jan 11, 2018 at 10:48:35AM -0500, David Miller wrote: > From: Geert Uytterhoeven > Date: Tue, 9 Jan 2018 12:11:21 +0100 > > > In case of success, the return values of (__)phy_write() and > > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while >

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread Geert Uytterhoeven
On Thu, Jan 11, 2018 at 4:53 PM, Russell King - ARM Linux wrote: > On Thu, Jan 11, 2018 at 10:48:35AM -0500, David Miller wrote: >> From: Geert Uytterhoeven >> Date: Tue, 9 Jan 2018 12:11:21 +0100 >> >> > In case of success, the return values of

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-11 Thread David Miller
From: Geert Uytterhoeven Date: Tue, 9 Jan 2018 12:11:21 +0100 > In case of success, the return values of (__)phy_write() and > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while > (__)phy_modify() returns the old PHY register value. > > Apparently

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Geert Uytterhoeven
Hi Russell, On Tue, Jan 9, 2018 at 7:31 PM, Russell King - ARM Linux wrote: > On Tue, Jan 09, 2018 at 07:25:40PM +0100, Geert Uytterhoeven wrote: >> On Tue, Jan 9, 2018 at 3:22 PM, Russell King - ARM Linux >> wrote: >> > On Tue, Jan 09, 2018 at

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 07:25:40PM +0100, Geert Uytterhoeven wrote: > Hi Russell, > > On Tue, Jan 9, 2018 at 3:22 PM, Russell King - ARM Linux > wrote: > > On Tue, Jan 09, 2018 at 03:10:08PM +0100, Andrew Lunn wrote: > >> On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Geert Uytterhoeven
Hi Russell, On Tue, Jan 9, 2018 at 3:22 PM, Russell King - ARM Linux wrote: > On Tue, Jan 09, 2018 at 03:10:08PM +0100, Andrew Lunn wrote: >> On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: >> > In case of success, the return values of (__)phy_write()

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 03:48:13PM +0100, Andrew Lunn wrote: > > > I took a quick look at the uses of phy_modify(). I don't see any uses > > > of the return code other than as an error indicator. So having it > > > return 0 on success seems like a better fix. > > > > I'd like to avoid that,

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Andrew Lunn
> > I took a quick look at the uses of phy_modify(). I don't see any uses > > of the return code other than as an error indicator. So having it > > return 0 on success seems like a better fix. > > I'd like to avoid that, because I don't want to have yet another > accessor that needs to be used

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Geert Uytterhoeven
Hi Russell, On Tue, Jan 9, 2018 at 3:22 PM, Russell King - ARM Linux wrote: > On Tue, Jan 09, 2018 at 03:10:08PM +0100, Andrew Lunn wrote: >> On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: >> > In case of success, the return values of (__)phy_write()

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Niklas Cassel
On 09/01/18 12:11, Geert Uytterhoeven wrote: > In case of success, the return values of (__)phy_write() and > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while > (__)phy_modify() returns the old PHY register value. > > Apparently this change was catered for in

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Russell King - ARM Linux
On Tue, Jan 09, 2018 at 03:10:08PM +0100, Andrew Lunn wrote: > On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: > > In case of success, the return values of (__)phy_write() and > > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while > > (__)phy_modify() returns

Re: [PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Andrew Lunn
On Tue, Jan 09, 2018 at 12:11:21PM +0100, Geert Uytterhoeven wrote: > In case of success, the return values of (__)phy_write() and > (__)phy_modify() are not compatible: (__)phy_write() returns 0, while > (__)phy_modify() returns the old PHY register value. > > Apparently this change was catered

[PATCH] net: phy: Fix phy_modify() semantic difference fallout

2018-01-09 Thread Geert Uytterhoeven
In case of success, the return values of (__)phy_write() and (__)phy_modify() are not compatible: (__)phy_write() returns 0, while (__)phy_modify() returns the old PHY register value. Apparently this change was catered for in drivers/net/phy/marvell.c, but not in other source files. Hence