| From eabaac5c3ed4be41aa240d07bf82fd9fd1ad5f81 Mon Sep 17 00:00:00 2001 |
| From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
| Date: Fri, 27 Jun 2014 18:59:13 +0400 |
| Subject: 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> |
| (cherry picked from commit 8eb12c3b420fb5243ce9b4a8878f3b88a3c91e33) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/pci/host/pcie-rcar.c | 10 ---------- |
| 1 file changed, 10 deletions(-) |
| |
| diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c |
| index 8e06124aa80f..c06b88846764 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, |
| struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata); |
| int ret; |
| |
| - if ((size == 2) && (where & 1)) |
| - return PCIBIOS_BAD_REGISTER_NUMBER; |
| - else if ((size == 4) && (where & 3)) |
| - return PCIBIOS_BAD_REGISTER_NUMBER; |
| - |
| ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, |
| bus, devfn, where, val); |
| if (ret != PCIBIOS_SUCCESSFUL) { |
| @@ -292,11 +287,6 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, |
| int shift, ret; |
| u32 data; |
| |
| - if ((size == 2) && (where & 1)) |
| - return PCIBIOS_BAD_REGISTER_NUMBER; |
| - else if ((size == 4) && (where & 3)) |
| - return PCIBIOS_BAD_REGISTER_NUMBER; |
| - |
| ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, |
| bus, devfn, where, &data); |
| if (ret != PCIBIOS_SUCCESSFUL) |
| -- |
| 2.1.2 |
| |