[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1KmL7vTunvbw1/U@lunn.ch>
Date: Fri, 21 Oct 2022 16:01:19 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
linux-kernel@...r.kernel.org, lxu@...linear.com,
hkallweit1@...il.com, pabeni@...hat.com, edumazet@...gle.com,
linux@...linux.org.uk, UNGLinuxDriver@...rochip.com,
Ian.Saturley@...rochip.com
Subject: Re: [PATCH net-next] net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set
driver for GPY211 chips
> +static void gpy_update_mdix(struct phy_device *phydev)
> +{
> + int ret;
> +
> + ret = phy_read(phydev, PHY_CTL1);
> + if (ret < 0) {
> + phydev_err(phydev, "Error: MDIO register access failed: %d\n",
> + ret);
> + return;
> + }
> @@ -413,6 +490,8 @@ static void gpy_update_interface(struct phy_device *phydev)
>
> if (phydev->speed == SPEED_2500 || phydev->speed == SPEED_1000)
> genphy_read_master_slave(phydev);
> +
> + gpy_update_mdix(phydev);
Do you know why gpy_update_interface() is a void function? It is
called from gpy_read_status() which does return error codes. And it
seems like gpy_read_status() would benefit from returning -EINVAL, etc.
Andrew
Powered by blists - more mailing lists