OSDN Git Service

Merge branches 'pci/host-dra7xx', 'pci/host-imx6' and 'pci/host-spear' into next
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Aug 2015 19:15:05 +0000 (14:15 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Aug 2015 19:15:05 +0000 (14:15 -0500)
* 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()

drivers/pci/host/pci-dra7xx.c
drivers/pci/host/pci-imx6.c
drivers/pci/host/pcie-spear13xx.c

index 52e2da7..199e29a 100644 (file)
@@ -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;
        }
index 233a196..8f3a981 100644 (file)
@@ -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)
index c49fbdc..98d2683 100644 (file)
@@ -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);
        }