فهرست منبع

Merge branches 'pci/host-dra7xx', 'pci/host-imx6' and 'pci/host-spear' into next

* pci/host-dra7xx:
  PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE()

* pci/host-imx6:
  PCI: imx6: Simplify a trivial if-return sequence

* pci/host-spear:
  PCI: spear: Use BUG_ON() instead of condition followed by BUG()
Bjorn Helgaas 10 سال پیش
والد
کامیت
2fc32c9259
3فایلهای تغییر یافته به همراه4 افزوده شده و 13 حذف شده
  1. 1 1
      drivers/pci/host/pci-dra7xx.c
  2. 2 10
      drivers/pci/host/pci-imx6.c
  3. 1 2
      drivers/pci/host/pcie-spear13xx.c

+ 1 - 1
drivers/pci/host/pci-dra7xx.c

@@ -396,7 +396,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 	ret = pm_runtime_get_sync(dev);
-	if (IS_ERR_VALUE(ret)) {
+	if (ret < 0) {
 		dev_err(dev, "pm_runtime_get_sync failed\n");
 		goto err_get_sync;
 	}

+ 2 - 10
drivers/pci/host/pci-imx6.c

@@ -117,11 +117,7 @@ static int pcie_phy_wait_ack(void __iomem *dbi_base, int addr)
 	val = addr << PCIE_PHY_CTRL_DATA_LOC;
 	writel(val, dbi_base + PCIE_PHY_CTRL);
 
-	ret = pcie_phy_poll_ack(dbi_base, 0);
-	if (ret)
-		return ret;
-
-	return 0;
+	return pcie_phy_poll_ack(dbi_base, 0);
 }
 
 /* Read from the 16-bit PCIe PHY control registers (not memory-mapped) */
@@ -148,11 +144,7 @@ static int pcie_phy_read(void __iomem *dbi_base, int addr , int *data)
 	/* deassert Read signal */
 	writel(0x00, dbi_base + PCIE_PHY_CTRL);
 
-	ret = pcie_phy_poll_ack(dbi_base, 0);
-	if (ret)
-		return ret;
-
-	return 0;
+	return pcie_phy_poll_ack(dbi_base, 0);
 }
 
 static int pcie_phy_write(void __iomem *dbi_base, int addr, int data)

+ 1 - 2
drivers/pci/host/pcie-spear13xx.c

@@ -223,8 +223,7 @@ static irqreturn_t spear13xx_pcie_irq_handler(int irq, void *arg)
 	status = readl(&app_reg->int_sts);
 
 	if (status & MSI_CTRL_INT) {
-		if (!IS_ENABLED(CONFIG_PCI_MSI))
-			BUG();
+		BUG_ON(!IS_ENABLED(CONFIG_PCI_MSI));
 		dw_handle_msi_irq(pp);
 	}