From: sashiko-bot@kernel.org
To: "Inochi Amaoto" <inochiama@gmail.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 2/6] PCI: spacemit-k1: Add multiple PHY handles support
Date: Mon, 07 Sep 2026 11:37:49 +0000 [thread overview]
Message-ID: <20260907113749.9E5B11F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907112606.465778-3-inochiama@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch uses non-existent PHY bulk APIs (`struct phy_bulk_data`, `devm_of_phy_bulk_get_all`, `phy_bulk_init`, `phy_bulk_exit`), which will cause an immediate build failure.
--
commit fe08b64098d53a53f4787c86d1612302f802dee7
Author: Inochi Amaoto <inochiama@gmail.com>
PCI: spacemit-k1: Add multiple PHY handles support
This commit extends the Spacemit K1 PCIe controller driver to support
multiple PHY handles by introducing bulk PHY API calls. It replaces single
PHY operations with bulk operations throughout the driver's initialization
and cleanup paths.
> diff --git a/drivers/pci/controller/dwc/pcie-spacemit-k1.c b/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> index 9512556d45390..1049391beee83 100644
> --- a/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> +++ b/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> @@ -51,12 +51,14 @@ struct k1_pcie_device_data {
> const struct dw_pcie_host_ops *host_ops;
> const struct dw_pcie_ops *ops;
> int (*parse_port)(struct k1_pcie *k1);
> + unsigned int max_phy_count;
> };
>
> struct k1_pcie {
> struct dw_pcie pci;
> const struct k1_pcie_device_data *data;
> - struct phy *phy;
> + struct phy_bulk_data *phys;
[Severity: Low]
Does struct phy_bulk_data exist in the kernel? It appears this type is
undefined, which will cause a build failure here in k1_pcie.
> + unsigned int phy_count;
> void __iomem *link;
> struct regmap *pmu; /* Errors ignored; MMIO-backed regmap */
[ ... ]
> @@ -115,6 +117,23 @@ static void k1_pcie_disable_resources(struct k1_pcie *k1)
> clk_bulk_disable_unprepare(ARRAY_SIZE(pci->app_clks), pci->app_clks);
> }
>
> +static int k1_pcie_get_phy_handle(struct k1_pcie *k1, struct device_node *node)
> +{
> + const struct k1_pcie_device_data *data = k1->data;
> + struct device *dev = k1->pci.dev;
> + int count;
> +
> + count = devm_of_phy_bulk_get_all(dev, node, &k1->phys);
[Severity: Low]
Is devm_of_phy_bulk_get_all() an upstream API? I'm unable to find this
function, and calling an undefined function will break the build during
k1_pcie_get_phy_handle().
> + if (count < 0)
> + return count;
> + if (count == 0 || count > data->max_phy_count)
> + return -EINVAL;
> +
> + k1->phy_count = count;
> +
> + return 0;
> +}
> +
> /* FIXME: Disable ASPM L1 to avoid errors reported on some NVMe drives */
> static void k1_pcie_disable_aspm_l1(struct k1_pcie *k1)
[ ... ]
> @@ -170,7 +189,7 @@ static int k1_pcie_init(struct dw_pcie_rp *pp)
> */
> regmap_set_bits(k1->pmu, reset_ctrl, DEVICE_TYPE_RC | PCIE_AUX_PWR_DET);
>
> - ret = phy_init(k1->phy);
> + ret = phy_bulk_init(k1->phy_count, k1->phys);
[Severity: Low]
Is phy_bulk_init() defined? Similar to the other bulk APIs used in this patch,
this appears to be an undefined function and will fail compilation in
k1_pcie_init().
> if (ret) {
> k1_pcie_disable_resources(k1);
>
> @@ -195,7 +214,7 @@ static void k1_pcie_deinit(struct dw_pcie_rp *pp)
> regmap_set_bits(k1->pmu, k1->pmu_off + PCIE_CLK_RESET_CONTROL,
> PCIE_RC_PERST);
>
> - phy_exit(k1->phy);
> + phy_bulk_exit(k1->phy_count, k1->phys);
[Severity: Low]
Does phy_bulk_exit() exist? Like the initialization function, this seems to be
undefined and will cause compilation to fail during k1_pcie_deinit().
>
> k1_pcie_disable_resources(k1);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907112606.465778-1-inochiama@gmail.com?part=2
next prev parent reply other threads:[~2026-09-07 11:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 11:25 [PATCH v5 0/6] riscv: spacemit: Add PCIe RC controller support for K3 Inochi Amaoto
2026-09-07 11:26 ` [PATCH v5 1/6] PCI: spacemit-k1: Add device data support Inochi Amaoto
2026-09-07 11:31 ` sashiko-bot
2026-09-08 10:26 ` Andy Shevchenko
2026-09-09 8:00 ` Inochi Amaoto
2026-09-10 5:44 ` Yao Zi
2026-09-10 6:42 ` Andy Shevchenko
2026-09-10 12:15 ` Yao Zi
2026-09-07 11:26 ` [PATCH v5 2/6] PCI: spacemit-k1: Add multiple PHY handles support Inochi Amaoto
2026-09-07 11:37 ` sashiko-bot [this message]
2026-09-08 10:29 ` Andy Shevchenko
2026-09-09 8:00 ` Inochi Amaoto
2026-09-09 14:27 ` Andy Shevchenko
2026-09-07 11:26 ` [PATCH v5 3/6] PCI: spacemit-k1: Add device id update helper Inochi Amaoto
2026-09-07 11:31 ` sashiko-bot
2026-09-07 11:26 ` [PATCH v5 4/6] dt-bindings: PCI: snps,dw-pcie: Add msi-parent for MSI handle check Inochi Amaoto
2026-09-07 11:35 ` sashiko-bot
2026-09-07 11:26 ` [PATCH v5 5/6] dt-bindings: PCI: spacemit: Introduce Spacemit K3 PCIe host controller Inochi Amaoto
2026-09-07 11:38 ` sashiko-bot
2026-09-07 13:08 ` Troy Mitchell
2026-09-09 8:01 ` Inochi Amaoto
2026-09-07 11:26 ` [PATCH v5 6/6] PCI: spacemit-k1: Add Spacemit K3 PCIe host controller support Inochi Amaoto
2026-09-07 11:42 ` sashiko-bot
2026-09-07 13:14 ` Troy Mitchell
2026-09-09 7:51 ` Inochi Amaoto
2026-09-10 9:51 ` Troy Mitchell
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=20260907113749.9E5B11F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@gmail.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;
as well as URLs for NNTP newsgroup(s).