Skip to contentSkip to conversation

PCI: altera: Remove redundant dev_err call in altera_pcie_parse_dt()

PATCH In review Wei Yongjun 3 participants 3 messages Oct 17, 2016 – Nov 11, 2016 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: altera: Remove redundant dev_err call in altera_pcie_parse_dt()

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

---
 drivers/pci/host/pcie-altera.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/host/pcie-altera.c +1 -3
index b0ac4df..8be45a8 100644
@@ -550,10 +550,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)
 
 	cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra");
 	pcie->cra_base = devm_ioremap_resource(dev, cra);
-	if (IS_ERR(pcie->cra_base)) {
-		dev_err(dev, "failed to map cra memory\n");
+	if (IS_ERR(pcie->cra_base))
 		return PTR_ERR(pcie->cra_base);
-	}
 
 	/* setup IRQ */
 	pcie->irq = platform_get_irq(pdev, 0);
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

---
 drivers/pci/host/pcie-altera.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/host/pcie-altera.c +0 -0
index b0ac4df..8be45a8 100644
@@ -550,10 +550,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)
 

drivers/pci/host/pcie-altera.c static int altera_pcie_parse_dt(struct altera_pcie *pcie) · line 557

Quoted 10 lines
drivers/pci/host/pcie-altera.c +1 -3
        cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra");
        pcie->cra_base = devm_ioremap_resource(dev, cra);
-       if (IS_ERR(pcie->cra_base)) {
-               dev_err(dev, "failed to map cra memory\n");
+       if (IS_ERR(pcie->cra_base))
                return PTR_ERR(pcie->cra_base);
-       }
 
        /* setup IRQ */
        pcie->irq = platform_get_irq(pdev, 0);
#2 lore raw
In reply to Wei Yongjun
Quoted 7 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.

Applied with Ley Foon Tan's ack to pci/host-altera for v4.10, thanks!

Quoted 27 lines
---
 drivers/pci/host/pcie-altera.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/host/pcie-altera.c +1 -4
index b0ac4df..8be45a8 100644
@@ -550,10 +550,8 @@ static int altera_pcie_parse_dt(struct altera_pcie *pcie)
 
 	cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra");
 	pcie->cra_base = devm_ioremap_resource(dev, cra);
-	if (IS_ERR(pcie->cra_base)) {
-		dev_err(dev, "failed to map cra memory\n");
+	if (IS_ERR(pcie->cra_base))
 		return PTR_ERR(pcie->cra_base);
-	}
 
 	/* setup IRQ */
 	pcie->irq = platform_get_irq(pdev, 0);
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html