Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "George Moussalem via B4 Relay"
	<devnull+george.moussalem.outlook.com@kernel.org>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY
Date: Tue, 09 Jun 2026 05:09:36 +0000	[thread overview]
Message-ID: <20260609050937.525CB1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260608-ipq5018-gephy-clocks-v4-4-fb2ccd56894b@outlook.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The use of `devm_clk_get_enabled()` makes 'rx' and 'tx' clocks mandatory, breaking backward compatibility with older Device Trees where these properties are absent.
--

commit f4405a562aab15670004ca1eb487237c7985a67a
Author: George Moussalem <george.moussalem@outlook.com>

net: phy: at803x: add RX and TX clock management for IPQ5018 PHY

Acquire and enable the RX and TX clocks for the IPQ5018 PHY.
These clocks are required for the PHY's datapath to function correctly.

> diff --git a/drivers/net/phy/qcom/at803x.c b/drivers/net/phy/qcom/at803x.c
> index 63726cf98cd42..ba4dc07752b60 100644
> --- a/drivers/net/phy/qcom/at803x.c
> +++ b/drivers/net/phy/qcom/at803x.c
[ ... ]
> @@ -1084,6 +1086,16 @@ static int ipq5018_probe(struct phy_device *phydev)
>  	priv->set_short_cable_dac = of_property_read_bool(dev->of_node,
>  							  "qcom,dac-preset-short-cable");
>  
> +	rx_clk = devm_clk_get_enabled(dev, "rx");
> +	if (IS_ERR(rx_clk))
> +		return dev_err_probe(dev, PTR_ERR(rx_clk),
> +				     "failed to get and enable RX clock\n");
> +
> +	tx_clk = devm_clk_get_enabled(dev, "tx");
> +	if (IS_ERR(tx_clk))
> +		return dev_err_probe(dev, PTR_ERR(tx_clk),
> +				     "failed to get and enable TX clock\n");

[Severity: High]
Does this break backward compatibility with older Device Trees that do not
specify these clock properties?

Using devm_clk_get_enabled() makes these clocks mandatory, which will cause
ipq5018_probe() to fail unconditionally with -ENOENT if they are missing.

Could this be changed to use devm_clk_get_optional_enabled() so the interface
continues to work with older Device Trees while still enabling the clocks
when they are present?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260608-ipq5018-gephy-clocks-v4-0-fb2ccd56894b@outlook.com?part=4

      reply	other threads:[~2026-06-09  5:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08  5:09 [PATCH v4 0/4] IPQ5018: Add and enable GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-08  5:09 ` [PATCH v4 1/4] dt-bindings: net: ethernet-phy: increase max clock count to two George Moussalem via B4 Relay
2026-06-08  5:09 ` [PATCH v4 2/4] dt-bindings: net: qca,ar803x: Add clocks for IPQ5018 PHY George Moussalem via B4 Relay
2026-06-08  5:09 ` [PATCH v4 3/4] arm64: qcom: ipq5018: Add GEPHY RX and TX clocks George Moussalem via B4 Relay
2026-06-08  5:09 ` [PATCH v4 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY George Moussalem via B4 Relay
2026-06-09  5:09   ` 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=20260609050937.525CB1F00898@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=devnull+george.moussalem.outlook.com@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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