public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Varadarajan Narayanan <quic_varada@quicinc.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: <lpieralisi@kernel.org>, <kw@linux.com>,
	<manivannan.sadhasivam@linaro.org>, <robh@kernel.org>,
	<bhelgaas@google.com>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <kishon@kernel.org>,
	<andersson@kernel.org>, <konradybcio@kernel.org>,
	<p.zabel@pengutronix.de>, <quic_nsekar@quicinc.com>,
	<dmitry.baryshkov@linaro.org>, <linux-arm-msm@vger.kernel.org>,
	<linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-phy@lists.infradead.org>
Subject: Re: [PATCH v10 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver
Date: Thu, 27 Feb 2025 14:23:28 +0530	[thread overview]
Message-ID: <Z8AoCHxD4IlFeXv9@hu-varada-blr.qualcomm.com> (raw)
In-Reply-To: <Z7//eDJZw2SNNc5Z@vaman>

On Thu, Feb 27, 2025 at 11:30:24AM +0530, Vinod Koul wrote:

[ . . .]

> > > should we not unroll the pipe clk registration here?
> >
> > Since it is a 'devm_' clk_hw_register_fixed_rate, wouldn't the devm
> > framework do the unregister?
> >
> > 	$ git diff
> > 	diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> > 	index 6b4f76b9c4da..3fd1a12cc163 100644
> > 	--- a/drivers/clk/clk-fixed-rate.c
> > 	+++ b/drivers/clk/clk-fixed-rate.c
> > 	@@ -58,6 +58,7 @@ static void
> > 	devm_clk_hw_register_fixed_rate_release(struct device *dev, void *re
> > 		 * the hw, resulting in double free. Just unregister the hw and
> > 		 * let
> > 		 * devres code kfree() it.
> > 		 */
> > 	+	printk("--> %s: %s\n", __func__, __clk_get_name(fix->hw.clk));
> > 		clk_hw_unregister(&fix->hw);
> > 	 }
> >
> > 	diff --git a/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
> > 	b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
> > 	index 311f98181177..9a8d8d9a7c2b 100644
> > 	--- a/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
> > 	+++ b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
> > 	@@ -267,6 +268,7 @@ static int qcom_uniphy_pcie_probe(struct
> > 	platform_device *pdev)
> >
> > 		phy_provider = devm_of_phy_provider_register(phy->dev,
> > 							     of_phy_simple_xlate);
> > 	+	phy_provider = ERR_PTR(-EINVAL);
> > 		if (IS_ERR(phy_provider))
> > 			return PTR_ERR(phy_provider);
> >
> > I forced an error here and saw that devm_clk_hw_register_fixed_rate_release
> > is getting called, which in turn calls clk_hw_unregister. Is that sufficient?
> > Or am i missing something.
>
> I missed that internally this is devm_, this is fine

Thanks for the clarification. Have posted V11, please review.

-Varada

  reply	other threads:[~2025-02-27  8:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06 12:17 [PATCH v10 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
2025-02-06 12:17 ` [PATCH v10 1/7] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Varadarajan Narayanan
2025-02-06 12:17 ` [PATCH v10 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver Varadarajan Narayanan
2025-02-13 17:52   ` Vinod Koul
2025-02-17  9:33     ` Varadarajan Narayanan
2025-02-27  6:00       ` Vinod Koul
2025-02-27  8:53         ` Varadarajan Narayanan [this message]
2025-02-06 12:17 ` [PATCH v10 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574 Varadarajan Narayanan
2025-02-06 12:18 ` [PATCH v10 4/7] arm64: dts: qcom: ipq9574: Reorder reg and reg-names Varadarajan Narayanan
2025-02-06 12:18 ` [PATCH v10 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller Varadarajan Narayanan
2025-02-10  9:08   ` Krzysztof Kozlowski
2025-02-06 12:18 ` [PATCH v10 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes Varadarajan Narayanan
2025-02-06 12:18 ` [PATCH v10 7/7] arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers Varadarajan Narayanan

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=Z8AoCHxD4IlFeXv9@hu-varada-blr.qualcomm.com \
    --to=quic_varada@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=kishon@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_nsekar@quicinc.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /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