diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-17 21:17:58 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-17 21:43:38 +0200 |
commit | 446fc23fb6f0cab15011d7daae856091856a65cc (patch) | |
tree | d3aac6245e18b0805805516380a1bac20764108f /drivers/pci/host/pci-exynos.c | |
parent | Linux 4.8-rc1 (diff) | |
download | linux-446fc23fb6f0cab15011d7daae856091856a65cc.tar.xz linux-446fc23fb6f0cab15011d7daae856091856a65cc.zip |
PCI: designware: Return data directly from dw_pcie_readl_rc()
dw_pcie_readl_rc() reads a u32 value. Previously we stored that value in
space supplied by the caller. Return the u32 value directly instead.
This makes the calling code read better and makes it obvious that the
caller need not initialize the storage. In the following example it isn't
clear whether "val" is initialized before being used:
dw_pcie_readl_rc(pp, PCI_COMMAND, &val);
if (val & PCI_COMMAND_MEMORY)
...
No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host/pci-exynos.c')
-rw-r--r-- | drivers/pci/host/pci-exynos.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c index 219976103efc..490f8b67bbd2 100644 --- a/drivers/pci/host/pci-exynos.c +++ b/drivers/pci/host/pci-exynos.c @@ -425,12 +425,15 @@ static void exynos_pcie_enable_interrupts(struct pcie_port *pp) exynos_pcie_msi_init(pp); } -static inline void exynos_pcie_readl_rc(struct pcie_port *pp, - void __iomem *dbi_base, u32 *val) +static inline u32 exynos_pcie_readl_rc(struct pcie_port *pp, + void __iomem *dbi_base) { + u32 val; + exynos_pcie_sideband_dbi_r_mode(pp, true); - *val = readl(dbi_base); + val = readl(dbi_base); exynos_pcie_sideband_dbi_r_mode(pp, false); + return val; } static inline void exynos_pcie_writel_rc(struct pcie_port *pp, |