linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe()
@ 2021-05-11 11:45 Zhen Lei
  2021-05-14 12:51 ` Krzysztof Wilczyński
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-11 11:45 UTC (permalink / raw)
  To: Richard Zhu, Lucas Stach, Lorenzo Pieralisi, Rob Herring,
	Bjorn Helgaas, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel
  Cc: Zhen Lei

When devm_ioremap_resource() fails, a clear enough error message will be
printed by its subfunction __devm_ioremap_resource(). The error
information contains the device name, failure cause, and possibly resource
information.

Therefore, remove the error printing here to simplify code and reduce the
binary size.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/pci/controller/dwc/pci-imx6.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 0cf1333c044032f..035fb622cafafcd 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1002,10 +1002,8 @@ static int imx6_pcie_probe(struct platform_device *pdev)
 			return ret;
 		}
 		imx6_pcie->phy_base = devm_ioremap_resource(dev, &res);
-		if (IS_ERR(imx6_pcie->phy_base)) {
-			dev_err(dev, "Unable to map PCIe PHY\n");
+		if (IS_ERR(imx6_pcie->phy_base))
 			return PTR_ERR(imx6_pcie->phy_base);
-		}
 	}
 
 	dbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe()
  2021-05-11 11:45 [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe() Zhen Lei
@ 2021-05-14 12:51 ` Krzysztof Wilczyński
  2021-05-28  7:54 ` Richard Zhu
  2021-06-03 16:44 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Wilczyński @ 2021-05-14 12:51 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Richard Zhu, Lucas Stach, Lorenzo Pieralisi, Rob Herring,
	Bjorn Helgaas, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel

Hi Zhen,

> When devm_ioremap_resource() fails, a clear enough error message will be
> printed by its subfunction __devm_ioremap_resource(). The error
> information contains the device name, failure cause, and possibly resource
> information.
> 
> Therefore, remove the error printing here to simplify code and reduce the
> binary size.
[...]

Thank you!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe()
  2021-05-11 11:45 [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe() Zhen Lei
  2021-05-14 12:51 ` Krzysztof Wilczyński
@ 2021-05-28  7:54 ` Richard Zhu
  2021-06-03 16:44 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Zhu @ 2021-05-28  7:54 UTC (permalink / raw)
  To: Zhen Lei, Lucas Stach, Lorenzo Pieralisi, Rob Herring,
	Bjorn Helgaas, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, dl-linux-imx, linux-pci, linux-arm-kernel

Hi Zhen Lei:
Thanks.

> Subject: [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in
> imx6_pcie_probe()
> 
> When devm_ioremap_resource() fails, a clear enough error message will be
> printed by its subfunction __devm_ioremap_resource(). The error information
> contains the device name, failure cause, and possibly resource information.
> 
> Therefore, remove the error printing here to simplify code and reduce the
> binary size.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Acked-by: Richard Zhu <hongxing.zhu@nxp.com>

Best Regards
Richard

> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> b/drivers/pci/controller/dwc/pci-imx6.c
> index 0cf1333c044032f..035fb622cafafcd 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1002,10 +1002,8 @@ static int imx6_pcie_probe(struct platform_device
> *pdev)
>  			return ret;
>  		}
>  		imx6_pcie->phy_base = devm_ioremap_resource(dev, &res);
> -		if (IS_ERR(imx6_pcie->phy_base)) {
> -			dev_err(dev, "Unable to map PCIe PHY\n");
> +		if (IS_ERR(imx6_pcie->phy_base))
>  			return PTR_ERR(imx6_pcie->phy_base);
> -		}
>  	}
> 
>  	dbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> --
> 2.26.0.106.g9fadedd
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe()
  2021-05-11 11:45 [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe() Zhen Lei
  2021-05-14 12:51 ` Krzysztof Wilczyński
  2021-05-28  7:54 ` Richard Zhu
@ 2021-06-03 16:44 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-03 16:44 UTC (permalink / raw)
  To: Lucas Stach, Richard Zhu, linux-pci, Bjorn Helgaas,
	Pengutronix Kernel Team, Zhen Lei, NXP Linux Team,
	linux-arm-kernel, Fabio Estevam, Rob Herring, Shawn Guo,
	Sascha Hauer
  Cc: Lorenzo Pieralisi

On Tue, 11 May 2021 19:45:47 +0800, Zhen Lei wrote:
> When devm_ioremap_resource() fails, a clear enough error message will be
> printed by its subfunction __devm_ioremap_resource(). The error
> information contains the device name, failure cause, and possibly resource
> information.
> 
> Therefore, remove the error printing here to simplify code and reduce the
> binary size.

Applied to pci/dwc, thanks!

[1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe()
      https://git.kernel.org/lpieralisi/pci/c/748a47f359

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-03 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 11:45 [PATCH 1/1] PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe() Zhen Lei
2021-05-14 12:51 ` Krzysztof Wilczyński
2021-05-28  7:54 ` Richard Zhu
2021-06-03 16:44 ` 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).