Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: xiaoning.wang@oss.nxp.com
Cc: Frank.Sae@motor-comm.com, leitao@debian.org,
	hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	imx@lists.linux.dev, xiaoning.wang@nxp.com
Subject: Re: [PATCH net V2] net: phy: motorcomm: read EEE abilities in yt8521_get_features()
Date: Fri, 10 Jul 2026 15:12:59 +0200	[thread overview]
Message-ID: <5d55cc0f-4b9f-42df-880a-290faf201cc8@lunn.ch> (raw)
In-Reply-To: <20260710080018.1070789-1-xiaoning.wang@oss.nxp.com>

> @@ -2490,7 +2490,8 @@ static int yt8521_get_features(struct phy_device *phydev)
>  		/* add fiber's features to phydev->supported */
>  		yt8521_prepare_fiber_features(phydev, phydev->supported);
>  	}
> -	return ret;
> +
> +	return ret ? ret : genphy_c45_read_eee_abilities(phydev);

Using a ? like this is very uncommon.

Please change it to the usual

        if (ret < 0)
               return ret;

	return genphy_c45_read_eee_abilities(phydev);

It might also be better to put the test after
yt8521_get_features_paged() call, since that is the only place missing
the test.

    Andrew

---
pw-bot: cr


      parent reply	other threads:[~2026-07-10 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10  8:00 [PATCH net V2] net: phy: motorcomm: read EEE abilities in yt8521_get_features() xiaoning.wang
2026-07-10  8:19 ` Breno Leitao
2026-07-10 13:12 ` Andrew Lunn [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=5d55cc0f-4b9f-42df-880a-290faf201cc8@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Frank.Sae@motor-comm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiaoning.wang@nxp.com \
    --cc=xiaoning.wang@oss.nxp.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