Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/8] interconnect: qcom: icc-rpm: depopulate SMD RPM child NoCs
Date: Mon, 19 Oct 2026 15:41:35 +0000	[thread overview]
Message-ID: <sashiko-outbox-177780@kernel.org> (raw)
In-Reply-To: <20261019-msm8998-icc-v1-3-c2da3934b6c8@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] interconnect: qcom: icc-rpm: WARN_ON() in qnoc_remove() for childless NoCs
--

commit e3eed275bb16fc9fb22f00c7b7dd10e369c4c8ab
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

interconnect: qcom: icc-rpm: depopulate SMD RPM child NoCs

This commit replaces of_platform_populate() in qnoc_probe() with
devm_of_platform_populate() and calls devm_of_platform_depopulate() in
qnoc_remove() to clean up child NoC devices before tearing down the parent
provider.

> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 6f325789a96ea..ddc7df31ed331 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -677,7 +677,7 @@ int qnoc_probe(struct platform_device *pdev)
>  
>  	/* Populate child NoC devices if any */
>  	if (of_get_child_count(dev->of_node) > 0) {
> -		ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
> +		ret = devm_of_platform_populate(dev);
>  		if (ret)
>  			goto err_deregister_provider;
>  	}
> @@ -699,6 +699,7 @@ void qnoc_remove(struct platform_device *pdev)
>  {
>  	struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
>  
> +	devm_of_platform_depopulate(&pdev->dev);
>  	icc_provider_deregister(&qp->provider);
>  	icc_nodes_remove(&qp->provider);
>  	clk_disable_unprepare(qp->bus_clk);

[Severity: Medium]
Will calling devm_of_platform_depopulate() unconditionally in qnoc_remove()
trigger a WARN_ON() when unbinding a NoC device without child nodes (or when
depopulating the child NoC devices themselves)?

In qnoc_probe(), devm_of_platform_populate() is only called when
of_get_child_count(dev->of_node) > 0. For any NoC device with 0 children, no
devm_of_platform_populate_release devres action is registered.

When qnoc_remove() later calls devm_of_platform_depopulate(&pdev->dev) on
such a device, devres_release() returns -ENOENT and triggers WARN_ON(ret):

drivers/of/platform.c:devm_of_platform_depopulate() {
	int ret;

	ret = devres_release(dev, devm_of_platform_populate_release,
			     devm_of_platform_match, dev);

	WARN_ON(ret);
}

Should devm_of_platform_depopulate() also be guarded, or could
devm_of_platform_populate() be called unconditionally (or
of_platform_populate() / of_platform_depopulate() used directly)?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261019-msm8998-icc-v1-0-c2da3934b6c8@oss.qualcomm.com?part=3

  reply	other threads:[~2026-10-19 15:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 14:12 [PATCH 0/8] interconnect: qcom: implement support for MSM8998 Dmitry Baryshkov
2026-10-19 14:12 ` [PATCH 1/8] dt-bindings: interconnect: add Qualcomm MSM8998 NoC Dmitry Baryshkov
2026-10-19 15:36   ` sashiko-bot
2026-10-20  8:24   ` Krzysztof Kozlowski
2026-10-20 10:25     ` Dmitry Baryshkov
2026-10-19 14:12 ` [PATCH 2/8] soc: qcom: smd-rpm: Handle zero-length errors Dmitry Baryshkov
2026-10-19 14:12 ` [PATCH 3/8] interconnect: qcom: icc-rpm: depopulate SMD RPM child NoCs Dmitry Baryshkov
2026-10-19 15:41   ` sashiko-bot [this message]
2026-10-19 14:12 ` [PATCH 4/8] interconnect: qcom: icc-rpm: skip duplicate SMD RPM node votes Dmitry Baryshkov
2026-10-19 14:12 ` [PATCH 5/8] interconnect: qcom: icc-rpm: Allow negative QoS offset Dmitry Baryshkov
2026-10-19 15:46   ` sashiko-bot
2026-10-19 14:12 ` [PATCH 6/8] interconnect: qcom: add MSM8998 interconnect provider Dmitry Baryshkov
2026-10-19 14:12 ` [PATCH 7/8] arm64: dts: qcom: msm8998: add interconnect provider nodes Dmitry Baryshkov
2026-10-20  7:11   ` Konrad Dybcio
2026-10-19 14:12 ` [PATCH 8/8] arm64: dts: qcom: msm8998: wire up interconnect paths Dmitry Baryshkov
2026-10-19 16:08   ` sashiko-bot
2026-10-20  7:16   ` Konrad Dybcio

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=sashiko-outbox-177780@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --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