Skip to contentSkip to conversation

PCI: dwc/imx6: Remove redundant error printing in imx6_pcie_probe()

PATCH Applied Zhen Lei 4 participants 4 messages May 11, 2021 – Jun 3, 2021

Subsystems (4)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

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.

---
 drivers/pci/controller/dwc/pci-imx6.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/controller/dwc/pci-imx6.c +1 -3
index 0cf1333c044032f..035fb622cafafcd 100644
@@ -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);
Signature · 1 line
2.26.0.106.g9fadedd
Reviewed-by on v1 1/1
#1 lore raw

Hi Zhen,

Quoted 7 lines

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!

Krzysztof

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Zhen Lei

Hi Zhen Lei:
Thanks.

Quoted 7 lines

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.

Quoted 5 lines

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

Best Regards
Richard

Quoted 25 lines
---
 drivers/pci/controller/dwc/pci-imx6.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/controller/dwc/pci-imx6.c +1 -3
index 0cf1333c044032f..035fb622cafafcd 100644
@@ -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

#3 lore raw
In reply to Zhen Lei
Quoted 7 lines · 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.

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