From: Sherry Sun <sherry.sun@nxp.com>
To: hongxing.zhu@nxp.com, l.stach@pengutronix.de, Frank.Li@nxp.com,
bhelgaas@google.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com
Cc: imx@lists.linux.dev, kernel@pengutronix.de,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH V2] PCI: imx6: Change imx_pcie_deassert_core_reset() to return void
Date: Fri, 6 Mar 2026 10:12:47 +0800 [thread overview]
Message-ID: <20260306021247.991976-1-sherry.sun@nxp.com> (raw)
The function imx_pcie_deassert_core_reset() always returns 0 and the
return value is not used meaningfully by its callers.
Change the return type from int to void to simplify the code and
remove unnecessary error handling paths. No functional change intended.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Changes in V2:
1. Remove the Fixes tag.
2. Add Reviewed-by tag.
---
drivers/pci/controller/dwc/pci-imx6.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 81a7093494c8..ba6e7c7ee625 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -906,7 +906,7 @@ static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)
gpiod_set_value_cansleep(imx_pcie->reset_gpiod, 1);
}
-static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie)
+static void imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie)
{
reset_control_deassert(imx_pcie->pciephy_reset);
@@ -920,8 +920,6 @@ static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie)
/* Wait for 100ms after PERST# deassertion (PCIe r5.0, 6.6.1) */
msleep(100);
}
-
- return 0;
}
static int imx_pcie_wait_for_speed_change(struct imx_pcie *imx_pcie)
@@ -1292,11 +1290,7 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)
/* Make sure that PCIe LTSSM is cleared */
imx_pcie_ltssm_disable(dev);
- ret = imx_pcie_deassert_core_reset(imx_pcie);
- if (ret < 0) {
- dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
- goto err_phy_off;
- }
+ imx_pcie_deassert_core_reset(imx_pcie);
if (imx_pcie->drvdata->wait_pll_lock) {
ret = imx_pcie->drvdata->wait_pll_lock(imx_pcie);
@@ -1613,9 +1607,7 @@ static int imx_pcie_resume_noirq(struct device *dev)
ret = imx_pcie->drvdata->enable_ref_clk(imx_pcie, true);
if (ret)
return ret;
- ret = imx_pcie_deassert_core_reset(imx_pcie);
- if (ret)
- return ret;
+ imx_pcie_deassert_core_reset(imx_pcie);
/*
* Using PCIE_TEST_PD seems to disable MSI and powers down the
--
2.37.1
next reply other threads:[~2026-03-06 2:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 2:12 Sherry Sun [this message]
2026-03-06 3:09 ` [PATCH V2] PCI: imx6: Change imx_pcie_deassert_core_reset() to return void Hongxing Zhu
2026-03-26 17:10 ` Manivannan Sadhasivam
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=20260306021247.991976-1-sherry.sun@nxp.com \
--to=sherry.sun@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=festevam@gmail.com \
--cc=hongxing.zhu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
/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