From: sashiko-bot@kernel.org
To: xiaoning.wang@oss.nxp.com
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH net] net: phy: motorcomm: read EEE abilities in yt8521_get_features()
Date: Thu, 02 Jul 2026 07:57:48 +0000 [thread overview]
Message-ID: <20260702075749.16DCC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701075730.133707-1-xiaoning.wang@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing early return on the error path allows execution to fall through, causing unnecessary MDIO reads during a failure state.
--
commit 4dca8ceeaa7210baaf997bd7af025147319f1c9b
Author: Clark Wang <xiaoning.wang@nxp.com>
net: phy: motorcomm: read EEE abilities in yt8521_get_features()
This patch updates yt8521_get_features() to call
genphy_c45_read_eee_abilities() so that EEE abilities are correctly
populated for YT8521/YT8531S devices.
> diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
> index 5071605a1a117..e69c453af574b 100644
> --- a/drivers/net/phy/motorcomm.c
> +++ b/drivers/net/phy/motorcomm.c
> @@ -2490,6 +2490,9 @@ static int yt8521_get_features(struct phy_device *phydev)
> /* add fiber's features to phydev->supported */
> yt8521_prepare_fiber_features(phydev, phydev->supported);
> }
> +
> + genphy_c45_read_eee_abilities(phydev);
[Severity: Low]
If yt8521_get_features_paged() fails in the first branch of this function:
if (priv->reg_page != YT8521_RSSR_TO_BE_ARBITRATED) {
ret = yt8521_get_features_paged(phydev, priv->reg_page);
} else {
ret will contain an error code, but there is no early return check before
falling through to this new call.
Could this cause genphy_c45_read_eee_abilities() to perform unnecessary
MDIO reads during a failure state?
> +
> return ret;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701075730.133707-1-xiaoning.wang@oss.nxp.com?part=1
prev parent reply other threads:[~2026-07-02 7:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 7:57 [PATCH net] net: phy: motorcomm: read EEE abilities in yt8521_get_features() xiaoning.wang
2026-07-01 8:11 ` Breno Leitao
2026-07-01 8:16 ` Clark Wang
2026-07-01 8:19 ` Breno Leitao
2026-07-01 14:32 ` Andrew Lunn
2026-07-02 7:57 ` sashiko-bot [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=20260702075749.16DCC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--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