From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org,
linux-pci@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 1/7] PCI: qcom: fix parsing of PERST# in the legacy case
Date: Mon, 08 Jun 2026 07:13:14 +0000 [thread overview]
Message-ID: <20260608071315.02CC51F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260608-sm8350-wifi-v2-1-efb68f1ff04c@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 a1eb87e2fab2443f5d8889e3755038df391d4632
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 into qcom_pcie_probe()
to share it between mixed and legacy platforms. This prevents -EBUSY errors
when acquiring the PERST# GPIO in legacy cases.
Link: 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 leak the runtime PM usage count?
Earlier in qcom_pcie_probe(), pm_runtime_get_sync() is called to increment
the PM usage count. If devm_gpiod_get_optional() fails here, returning
directly bypasses the err_pm_runtime_put cleanup path, which leaves runtime
PM enabled and causes an unbalanced count.
Should this be setting ret = PTR_ERR(pcie->reset) and jumping to
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/20260608-sm8350-wifi-v2-0-efb68f1ff04c@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-06-08 7:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 6:59 [PATCH v2 0/7] arm64: dts: qcom: enable WiFi/BT on SM8350 HDK Dmitry Baryshkov
2026-06-08 6:59 ` [PATCH v2 1/7] PCI: qcom: fix parsing of PERST# in the legacy case Dmitry Baryshkov
2026-06-08 7:13 ` sashiko-bot [this message]
2026-06-08 14:30 ` Bartosz Golaszewski
2026-06-08 6:59 ` [PATCH v2 2/7] wifi: ath11k: enable support for WCN6851 Dmitry Baryshkov
2026-06-08 7:08 ` sashiko-bot
2026-06-08 6:59 ` [PATCH v2 3/7] regulator: dt-bindings: qcom,qca6390-pmu: document WCN6851 Dmitry Baryshkov
2026-06-08 6:59 ` [PATCH v2 4/7] dt-bindings: bluetooth: qcom,wcn6855-bt: " Dmitry Baryshkov
2026-06-08 6:59 ` [PATCH v2 5/7] arm64: dts: qcom: sm8350: expand UART18 to 4 pins config Dmitry Baryshkov
2026-06-08 6:59 ` [PATCH v2 6/7] arm64: dts: qcom: sm8350: modernize PCIe entries Dmitry Baryshkov
2026-06-08 6:59 ` [PATCH v2 7/7] arm64: dts: qcom: sm8350-hdk: describe WiFi/BT chip Dmitry Baryshkov
2026-06-08 15:18 ` [PATCH v2 0/7] arm64: dts: qcom: enable WiFi/BT on SM8350 HDK Rob Herring
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=20260608071315.02CC51F00893@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