* [PATCH V2] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER
@ 2020-08-11 1:29 Anson Huang
2020-08-11 8:00 ` Lucas Stach
2020-09-07 14:38 ` Lorenzo Pieralisi
0 siblings, 2 replies; 3+ messages in thread
From: Anson Huang @ 2020-08-11 1:29 UTC (permalink / raw)
To: hongxing.zhu, l.stach, lorenzo.pieralisi, robh, bhelgaas,
shawnguo, s.hauer, kernel, festevam, linux-pci, linux-arm-kernel,
linux-kernel
Cc: Linux-imx
When devm_clk_get() returns -EPROBE_DEFER, i.MX6 PCI driver should
NOT print error message, use dev_err_probe() to handle it.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
drivers/pci/controller/dwc/pci-imx6.c | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 90df28c..e6d6116 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1073,38 +1073,33 @@ static int imx6_pcie_probe(struct platform_device *pdev)
/* Fetch clocks */
imx6_pcie->pcie_phy = devm_clk_get(dev, "pcie_phy");
- if (IS_ERR(imx6_pcie->pcie_phy)) {
- dev_err(dev, "pcie_phy clock source missing or invalid\n");
- return PTR_ERR(imx6_pcie->pcie_phy);
- }
+ if (IS_ERR(imx6_pcie->pcie_phy))
+ return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_phy),
+ "pcie_phy clock source missing or invalid\n");
imx6_pcie->pcie_bus = devm_clk_get(dev, "pcie_bus");
- if (IS_ERR(imx6_pcie->pcie_bus)) {
- dev_err(dev, "pcie_bus clock source missing or invalid\n");
- return PTR_ERR(imx6_pcie->pcie_bus);
- }
+ if (IS_ERR(imx6_pcie->pcie_bus))
+ return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_bus),
+ "pcie_bus clock source missing or invalid\n");
imx6_pcie->pcie = devm_clk_get(dev, "pcie");
- if (IS_ERR(imx6_pcie->pcie)) {
- dev_err(dev, "pcie clock source missing or invalid\n");
- return PTR_ERR(imx6_pcie->pcie);
- }
+ if (IS_ERR(imx6_pcie->pcie))
+ return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie),
+ "pcie clock source missing or invalid\n");
switch (imx6_pcie->drvdata->variant) {
case IMX6SX:
imx6_pcie->pcie_inbound_axi = devm_clk_get(dev,
"pcie_inbound_axi");
- if (IS_ERR(imx6_pcie->pcie_inbound_axi)) {
- dev_err(dev, "pcie_inbound_axi clock missing or invalid\n");
- return PTR_ERR(imx6_pcie->pcie_inbound_axi);
- }
+ if (IS_ERR(imx6_pcie->pcie_inbound_axi))
+ return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_inbound_axi),
+ "pcie_inbound_axi clock missing or invalid\n");
break;
case IMX8MQ:
imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
- if (IS_ERR(imx6_pcie->pcie_aux)) {
- dev_err(dev, "pcie_aux clock source missing or invalid\n");
- return PTR_ERR(imx6_pcie->pcie_aux);
- }
+ if (IS_ERR(imx6_pcie->pcie_aux))
+ return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
+ "pcie_aux clock source missing or invalid\n");
/* fall through */
case IMX7D:
if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER
2020-08-11 1:29 [PATCH V2] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER Anson Huang
@ 2020-08-11 8:00 ` Lucas Stach
2020-09-07 14:38 ` Lorenzo Pieralisi
1 sibling, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2020-08-11 8:00 UTC (permalink / raw)
To: Anson Huang, hongxing.zhu, lorenzo.pieralisi, robh, bhelgaas,
shawnguo, s.hauer, kernel, festevam, linux-pci, linux-arm-kernel,
linux-kernel
Cc: Linux-imx
Am Dienstag, den 11.08.2020, 09:29 +0800 schrieb Anson Huang:
> When devm_clk_get() returns -EPROBE_DEFER, i.MX6 PCI driver should
> NOT print error message, use dev_err_probe() to handle it.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 35 +++++++++++++++--------------------
> 1 file changed, 15 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 90df28c..e6d6116 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1073,38 +1073,33 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>
> /* Fetch clocks */
> imx6_pcie->pcie_phy = devm_clk_get(dev, "pcie_phy");
> - if (IS_ERR(imx6_pcie->pcie_phy)) {
> - dev_err(dev, "pcie_phy clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_phy);
> - }
> + if (IS_ERR(imx6_pcie->pcie_phy))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_phy),
> + "pcie_phy clock source missing or invalid\n");
>
> imx6_pcie->pcie_bus = devm_clk_get(dev, "pcie_bus");
> - if (IS_ERR(imx6_pcie->pcie_bus)) {
> - dev_err(dev, "pcie_bus clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_bus);
> - }
> + if (IS_ERR(imx6_pcie->pcie_bus))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_bus),
> + "pcie_bus clock source missing or invalid\n");
>
> imx6_pcie->pcie = devm_clk_get(dev, "pcie");
> - if (IS_ERR(imx6_pcie->pcie)) {
> - dev_err(dev, "pcie clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie);
> - }
> + if (IS_ERR(imx6_pcie->pcie))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie),
> + "pcie clock source missing or invalid\n");
>
> switch (imx6_pcie->drvdata->variant) {
> case IMX6SX:
> imx6_pcie->pcie_inbound_axi = devm_clk_get(dev,
> "pcie_inbound_axi");
> - if (IS_ERR(imx6_pcie->pcie_inbound_axi)) {
> - dev_err(dev, "pcie_inbound_axi clock missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_inbound_axi);
> - }
> + if (IS_ERR(imx6_pcie->pcie_inbound_axi))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_inbound_axi),
> + "pcie_inbound_axi clock missing or invalid\n");
> break;
> case IMX8MQ:
> imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
> - if (IS_ERR(imx6_pcie->pcie_aux)) {
> - dev_err(dev, "pcie_aux clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_aux);
> - }
> + if (IS_ERR(imx6_pcie->pcie_aux))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
> + "pcie_aux clock source missing or invalid\n");
> /* fall through */
> case IMX7D:
> if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER
2020-08-11 1:29 [PATCH V2] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER Anson Huang
2020-08-11 8:00 ` Lucas Stach
@ 2020-09-07 14:38 ` Lorenzo Pieralisi
1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2020-09-07 14:38 UTC (permalink / raw)
To: Anson Huang
Cc: hongxing.zhu, l.stach, robh, bhelgaas, shawnguo, s.hauer, kernel,
festevam, linux-pci, linux-arm-kernel, linux-kernel, Linux-imx
On Tue, Aug 11, 2020 at 09:29:24AM +0800, Anson Huang wrote:
> When devm_clk_get() returns -EPROBE_DEFER, i.MX6 PCI driver should
> NOT print error message, use dev_err_probe() to handle it.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 35 +++++++++++++++--------------------
> 1 file changed, 15 insertions(+), 20 deletions(-)
Applied to pci/imx6, thanks.
Lorenzo
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 90df28c..e6d6116 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1073,38 +1073,33 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>
> /* Fetch clocks */
> imx6_pcie->pcie_phy = devm_clk_get(dev, "pcie_phy");
> - if (IS_ERR(imx6_pcie->pcie_phy)) {
> - dev_err(dev, "pcie_phy clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_phy);
> - }
> + if (IS_ERR(imx6_pcie->pcie_phy))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_phy),
> + "pcie_phy clock source missing or invalid\n");
>
> imx6_pcie->pcie_bus = devm_clk_get(dev, "pcie_bus");
> - if (IS_ERR(imx6_pcie->pcie_bus)) {
> - dev_err(dev, "pcie_bus clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_bus);
> - }
> + if (IS_ERR(imx6_pcie->pcie_bus))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_bus),
> + "pcie_bus clock source missing or invalid\n");
>
> imx6_pcie->pcie = devm_clk_get(dev, "pcie");
> - if (IS_ERR(imx6_pcie->pcie)) {
> - dev_err(dev, "pcie clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie);
> - }
> + if (IS_ERR(imx6_pcie->pcie))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie),
> + "pcie clock source missing or invalid\n");
>
> switch (imx6_pcie->drvdata->variant) {
> case IMX6SX:
> imx6_pcie->pcie_inbound_axi = devm_clk_get(dev,
> "pcie_inbound_axi");
> - if (IS_ERR(imx6_pcie->pcie_inbound_axi)) {
> - dev_err(dev, "pcie_inbound_axi clock missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_inbound_axi);
> - }
> + if (IS_ERR(imx6_pcie->pcie_inbound_axi))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_inbound_axi),
> + "pcie_inbound_axi clock missing or invalid\n");
> break;
> case IMX8MQ:
> imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux");
> - if (IS_ERR(imx6_pcie->pcie_aux)) {
> - dev_err(dev, "pcie_aux clock source missing or invalid\n");
> - return PTR_ERR(imx6_pcie->pcie_aux);
> - }
> + if (IS_ERR(imx6_pcie->pcie_aux))
> + return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
> + "pcie_aux clock source missing or invalid\n");
> /* fall through */
> case IMX7D:
> if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-07 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 1:29 [PATCH V2] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER Anson Huang
2020-08-11 8:00 ` Lucas Stach
2020-09-07 14:38 ` Lorenzo Pieralisi
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).