]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: designware: Return data directly from dw_pcie_readl_rc()
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Aug 2016 19:17:58 +0000 (14:17 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Aug 2016 19:43:38 +0000 (14:43 -0500)
commit5386db1163f829d129b2d647d36085e8d4055ccd
treed3aac6245e18b0805805516380a1bac20764108f
parentb482605f7939bd4035b2d11a7952dc3da5821c6d
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>
drivers/pci/host/pci-exynos.c
drivers/pci/host/pcie-designware.c
drivers/pci/host/pcie-designware.h