[PATCH 2/2] net: phy: mv88e6352: Fix miiphy_read/miiphy_write return value checks

Daniel Klauer daniel.klauer at gin.de
Wed Feb 16 11:52:49 CET 2022


On 15.02.22 08:08, Ramon Fried wrote:
> On Mon, Feb 14, 2022 at 12:33 PM Daniel Klauer <daniel.klauer at gin.de> wrote:
>>
>> On 12.02.22 12:50, Ramon Fried wrote:
>> > On Wed, Feb 9, 2022 at 5:41 PM Daniel Klauer <daniel.klauer at gin.de> wrote:
>> >>
>> >> The miiphy_read/miiphy_write functions return 1 on error, not -errno.
>> > Why don't you just fix the miiphy_read/miiphy_write functions ?
>>
>> Other functions from that module do the same, so I assumed it's intentional.
>> It could be fixed too though, with a corresponding fix up of the few callers
>> that expect the positive return value on error.
> Sometimes a real fix needs more work.
> What caused you to change it on your side to -EIO, is there someone
> checking for EIO in the framework code ?

It's not that anything specifically expects -EIO, I just picked it because I
had to pick something and it seemed like a good solution. Of course that only
makes sense with the current miiphy_read/write functions which don't propagate
the real errno. If that were to be changed, this patch for mv88e6352.c would
not be useful anymore.


More information about the U-Boot mailing list