[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <g3lapumfhr27nm54e54d6qwkbswfkfjybhdkmr4g67rnqihukt@qqwdfsh4p6pm>
Date: Thu, 3 Jul 2025 12:29:52 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>
Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kwilczynski@...nel.org>, Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, cros-qcom-dts-watchers@...omium.org,
linux-arm-msm@...r.kernel.org, linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, quic_vbadigan@...cinc.com, quic_mrana@...cinc.com
Subject: Re: [PATCH v5 2/2] PCI: qcom: Add support for multi-root port
On Thu, Jul 03, 2025 at 09:48:17AM GMT, Krishna Chaitanya Chundru wrote:
>
>
> On 7/2/2025 9:03 PM, Manivannan Sadhasivam wrote:
> > On Wed, Jul 02, 2025 at 04:50:42PM GMT, Krishna Chaitanya Chundru wrote:
> >
> > [...]
> >
> > > - ret = phy_init(pcie->phy);
> > > - if (ret)
> > > - goto err_pm_runtime_put;
> > > + for_each_available_child_of_node(dev->of_node, of_port) {
> > > + ret = qcom_pcie_parse_port(pcie, of_port);
> > > + of_node_put(of_port);
> > > + if (ret) {
> > > + if (ret != -ENOENT) {
> > > + dev_err_probe(pci->dev, ret,
> > > + "Failed to parse port nodes %d\n",
> > > + ret);
> > > + goto err_port_del;
> > > + }
> > > + break;
> > > + }
> > > + }
> > > +
> > > + /*
> > > + * In the case of properties not populated in root port, fallback to the
> > > + * legacy method of parsing the host bridge node. This is to maintain DT
> > > + * backwards compatibility.
> > > + */
> > > + if (ret) {
> > > + pcie->phy = devm_phy_optional_get(dev, "pciephy");
> > > + if (IS_ERR(pcie->phy)) {
> > > + ret = PTR_ERR(pcie->phy);
> > > + goto err_pm_runtime_put;
> >
> > Shouldn't this and below be err_port_del?
> >
> This is a legacy way of parsing property, if the execution
> comes here means the port parsing has failed and ports are not created.
> so err_port_del will not have any effect.
>
Oops. I got confused by the if (ret) flow. It would be more clear if a goto is
used to indicate that the legacy codeblock is skipped. I'll just incorporate it
while applying.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists