From: sashiko-bot@kernel.org
To: "Alex Elder" <elder@riscstar.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/5] arm64: dts: qcom: lemans-evk-ifp-mezzanine: use pci for device nodes
Date: Tue, 01 Sep 2026 17:49:15 +0000 [thread overview]
Message-ID: <20260901174915.BC2641F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260901172058.1512508-4-elder@riscstar.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Ineffective Bug Fix / Logic Flaw: renaming nodes fails to prevent them from being parsed as PCI bridges
--
commit a26d89db10179b360a293aeb14a12f49b7daf216
Author: Alex Elder <elder@riscstar.com>
arm64: dts: qcom: lemans-evk-ifp-mezzanine: use pci for device nodes
This patch renames the PCIe endpoint nodes from "pcie@" to "pci@" in the
Lemans EVK IFP mezzanine devicetree. The goal is to prevent the devicetree
parsing code from incorrectly treating these endpoint nodes as PCI bridge
nodes.
> diff --git a/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso b/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
> index 6cfa0bc1440e9..22c975628ed79 100644
> --- a/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
> +++ b/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
> @@ -271,7 +271,7 @@ pcie@3,0 {
> ranges;
> bus-range = <0x5 0xff>;
>
> - pcie@0,0 {
> + pci@0,0 {
> reg = <0x50000 0x0 0x0 0x0 0x0>;
> #address-cells = <3>;
> #size-cells = <2>;
> device_type = "pci";
[Severity: Medium]
Will this rename successfully prevent the node from being matched as a PCI
bridge?
When the devicetree address parser matches the bus type, it iterates of_busses
and calls of_bus_pci_match() which checks:
of_bus_pci_match() {
return of_node_is_type(np, "pci") || ... || of_node_is_pcie(np);
}
Since this node still retains the device_type = "pci" property,
of_node_is_type(np, "pci") will evaluate to true immediately.
Does this mean the of_node_is_pcie() check is completely bypassed, leaving the
node still incorrectly matched as a PCI bus? Should the device_type = "pci"
property be removed from these endpoint nodes instead, as required by the
devicetree specification?
> ranges;
> };
>
> - pcie@0,1 {
> + pci@0,1 {
> reg = <0x50100 0x0 0x0 0x0 0x0>;
> #address-cells = <3>;
> #size-cells = <2>;
> device_type = "pci";
[Severity: Medium]
Does the same logic flaw apply to this node as well?
Because the device_type = "pci" property is also still present here, it
appears this node will also unconditionally match as a PCI bus in
of_bus_pci_match() regardless of the rename.
> ranges;
> };
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260901172058.1512508-1-elder@riscstar.com?part=3
next prev parent reply other threads:[~2026-09-01 17:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 17:20 [PATCH 0/5] arm64: dts: qcom: use pci for device nodes Alex Elder
2026-09-01 17:20 ` [PATCH 1/5] arm64: dts: qcom: qcs6490-rb3gen2: " Alex Elder
2026-09-01 17:39 ` sashiko-bot
2026-09-01 17:45 ` Alex Elder
2026-09-01 20:05 ` Rob Herring
2026-09-02 12:51 ` Alex Elder
2026-09-02 16:53 ` Rob Herring
2026-09-02 18:40 ` Alex Elder
2026-09-01 17:20 ` [PATCH 2/5] arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: " Alex Elder
2026-09-01 17:34 ` sashiko-bot
2026-09-01 17:20 ` [PATCH 3/5] arm64: dts: qcom: lemans-evk-ifp-mezzanine: " Alex Elder
2026-09-01 17:49 ` sashiko-bot [this message]
2026-09-01 17:20 ` [PATCH 4/5] arm64: dts: qcom: monaco-evk-ifp-mezzanine: use dev " Alex Elder
2026-09-01 17:54 ` sashiko-bot
2026-09-01 18:18 ` Alex Elder
2026-09-01 17:20 ` [PATCH 5/5] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: " Alex Elder
2026-09-01 18:03 ` sashiko-bot
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=20260901174915.BC2641F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elder@riscstar.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