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,
linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/7] PCI: qcom: fix parsing of PERST# in the legacy case
Date: Mon, 01 Jun 2026 09:59:26 +0000 [thread overview]
Message-ID: <20260601095927.5AAFF1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260601-sm8350-wifi-v1-1-242917d88031@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Direct return on devm_gpiod_get_optional failure in qcom_pcie_probe() bypasses PM runtime cleanup.
--
commit 40b8aa014962b990fbbdd6f190bcea40db01e096
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
PCI: qcom: fix parsing of PERST# in the legacy case
This commit moves the parsing of the RC's perst-gpios to qcom_pcie_probe()
to handle both mixed and legacy device tree configurations without acquiring
the same GPIO twice.
Closes: https://lore.kernel.org/r/gieaybsg2ckxpctvqj77nlwu7utama2yeyvebkonmexsxrra3v@v3fobqasxnmy/
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 11fc604898926..7664c7c28c0e3 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
[ ... ]
> @@ -2107,6 +2093,15 @@ static int qcom_pcie_probe(struct platform_device *pdev)
>
> pp->ops = &qcom_pcie_dw_ops;
>
> + if (of_find_property(dev->of_node, "perst-gpios", NULL)) {
> + pcie->reset = devm_gpiod_get_optional(dev, "perst",
> + GPIOD_OUT_HIGH);
> + if (IS_ERR(pcie->reset))
> + return PTR_ERR(pcie->reset);
[Severity: High]
Does this direct return bypass the PM runtime cleanup?
Earlier in qcom_pcie_probe(), pm_runtime_enable(dev) and
pm_runtime_get_sync(dev) are called successfully, which increments the
device's PM runtime usage counter.
If devm_gpiod_get_optional() fails here (for example, with -EPROBE_DEFER
if the GPIOs are not yet ready), returning directly leaves the PM runtime
usage counter leaked because the goto err_pm_runtime_put path is skipped.
This will lead to an unbalanced pm_runtime_enable warning during probe
retries.
Should this be updated to assign the error to ret and use goto
err_pm_runtime_put instead?
> +
> + dev_warn(dev, "Reusing PERST# from Root Complex node. DT needs to be updated!\n");
> + }
> +
> ret = qcom_pcie_parse_ports(pcie);
> if (ret) {
> if (ret != -ENODEV) {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-sm8350-wifi-v1-0-242917d88031@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-06-01 9:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 9:46 [PATCH 0/7] arm64: dts: qcom: enable WiFi/BT on SM8350 HDK Dmitry Baryshkov
2026-06-01 9:46 ` [PATCH 1/7] PCI: qcom: fix parsing of PERST# in the legacy case Dmitry Baryshkov
2026-06-01 9:59 ` sashiko-bot [this message]
2026-06-01 9:46 ` [PATCH 2/7] wifi: ath11k: enable support for WCN6851 Dmitry Baryshkov
2026-06-01 10:08 ` sashiko-bot
2026-06-01 13:54 ` Jeff Johnson
2026-06-01 9:46 ` [PATCH 3/7] regulator: dt-bindings: qcom,qca6390-pmu: document WCN6851 Dmitry Baryshkov
2026-06-01 9:46 ` [PATCH 4/7] dt-bindings: bluetooth: qcom,wcn6855-bt: " Dmitry Baryshkov
2026-06-01 9:46 ` [PATCH 5/7] arm64: dts: qcom: sm8350: expand UART18 to 4 pins config Dmitry Baryshkov
2026-06-01 9:46 ` [PATCH 6/7] arm64: dts: qcom: sm8350: modernize PCIe entries Dmitry Baryshkov
2026-06-01 10:24 ` sashiko-bot
2026-06-01 9:46 ` [PATCH 7/7] arm64: dts: qcom: sm8350-hdk: describe WiFi/BT chip Dmitry Baryshkov
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=20260601095927.5AAFF1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=linux-pci@vger.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