netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	linux-kernel@vger.kernel.org, lxu@maxlinear.com,
	hkallweit1@gmail.com, pabeni@redhat.com, edumazet@google.com,
	linux@armlinux.org.uk, UNGLinuxDriver@microchip.com,
	Ian.Saturley@microchip.com
Subject: Re: [PATCH net-next] net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips
Date: Fri, 21 Oct 2022 16:01:19 +0200	[thread overview]
Message-ID: <Y1KmL7vTunvbw1/U@lunn.ch> (raw)
In-Reply-To: <20221021100305.6576-1-Raju.Lakkaraju@microchip.com>

> +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

  parent reply	other threads:[~2022-10-21 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 10:03 [PATCH net-next] net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips Raju Lakkaraju
2022-10-21 11:40 ` Russell King (Oracle)
2022-10-21 14:01 ` Andrew Lunn [this message]
2022-10-24  7:24   ` Raju Lakkaraju
2022-10-24 11:54     ` Andrew Lunn

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=Y1KmL7vTunvbw1/U@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Ian.Saturley@microchip.com \
    --cc=Raju.Lakkaraju@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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).