diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-06-27 10:59:13 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-07-05 13:45:39 -0400 |
commit | 8eb12c3b420fb5243ce9b4a8878f3b88a3c91e33 (patch) | |
tree | 2832f5f7887a1e82ac36692af5e551a33cd7ccc6 | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
PCI: rcar: Remove redundant config accessor register number checks
The PCI core will have already checked the configuration register address
before calling the {read|write}() methods; so don't check it again in these
methods.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | drivers/pci/host/pcie-rcar.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index f7d3de32c9a0..027876a1fc3f 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c | |||
@@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn, | |||
260 | struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata); | 260 | struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata); |
261 | int ret; | 261 | int ret; |
262 | 262 | ||
263 | if ((size == 2) && (where & 1)) | ||
264 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
265 | else if ((size == 4) && (where & 3)) | ||
266 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
267 | |||
268 | ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, | 263 | ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, |
269 | bus, devfn, where, val); | 264 | bus, devfn, where, val); |
270 | if (ret != PCIBIOS_SUCCESSFUL) { | 265 | if (ret != PCIBIOS_SUCCESSFUL) { |
@@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, | |||
291 | int shift, ret; | 286 | int shift, ret; |
292 | u32 data; | 287 | u32 data; |
293 | 288 | ||
294 | if ((size == 2) && (where & 1)) | ||
295 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
296 | else if ((size == 4) && (where & 3)) | ||
297 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
298 | |||
299 | ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, | 289 | ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, |
300 | bus, devfn, where, &data); | 290 | bus, devfn, where, &data); |
301 | if (ret != PCIBIOS_SUCCESSFUL) | 291 | if (ret != PCIBIOS_SUCCESSFUL) |