From: David Miller <davem@davemloft.net>
To: andrew@lunn.ch
Cc: geert@linux-m68k.org, niklas.cassel@axis.com,
rmk+kernel@arm.linux.org.uk, f.fainelli@gmail.com,
netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: phy: Have __phy_modify return 0 on success
Date: Mon, 15 Jan 2018 12:50:13 -0500 (EST) [thread overview]
Message-ID: <20180115.125013.1494098943775766238.davem@davemloft.net> (raw)
In-Reply-To: <1515765696-1286-1-git-send-email-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
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 <geert@linux-m68k.org>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> v2: space before :
> additional fixes tag
> Tested-by
Applied to net-next, thanks Andrew.
prev parent reply other threads:[~2018-01-15 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 14:01 [PATCH v2] net: phy: Have __phy_modify return 0 on success Andrew Lunn
2018-01-14 18:04 ` Andrew Lunn
2018-01-14 18:29 ` David Miller
2018-01-15 9:06 ` Niklas Cassel
2018-01-15 17:50 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115.125013.1494098943775766238.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=geert@linux-m68k.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.cassel@axis.com \
--cc=rmk+kernel@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).