diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-17 14:17:58 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-17 14:43:38 -0500 |
commit | 446fc23fb6f0cab15011d7daae856091856a65cc (patch) | |
tree | d3aac6245e18b0805805516380a1bac20764108f /drivers/pci/host/pcie-designware.h | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) | |
download | blackbird-op-linux-446fc23fb6f0cab15011d7daae856091856a65cc.tar.gz blackbird-op-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/pcie-designware.h')
-rw-r--r-- | drivers/pci/host/pcie-designware.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h index f437f9b5be04..74a8fc6abdba 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h @@ -57,8 +57,7 @@ struct pcie_port { }; struct pcie_host_ops { - void (*readl_rc)(struct pcie_port *pp, - void __iomem *dbi_base, u32 *val); + u32 (*readl_rc)(struct pcie_port *pp, void __iomem *dbi_base); void (*writel_rc)(struct pcie_port *pp, u32 val, void __iomem *dbi_base); int (*rd_own_conf)(struct pcie_port *pp, int where, int size, u32 *val); |