提交 8eb12c3b 编写于 作者: S Sergei Shtylyov 提交者: Bjorn Helgaas

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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NPhil Edworthy <phil.edworthy@renesas.com>
Acked-by: NSimon Horman <horms+renesas@verge.net.au>
上级 7171511e
...@@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn, ...@@ -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); struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
int ret; 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, ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
bus, devfn, where, val); bus, devfn, where, val);
if (ret != PCIBIOS_SUCCESSFUL) { if (ret != PCIBIOS_SUCCESSFUL) {
...@@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, ...@@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
int shift, ret; int shift, ret;
u32 data; 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, ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
bus, devfn, where, &data); bus, devfn, where, &data);
if (ret != PCIBIOS_SUCCESSFUL) if (ret != PCIBIOS_SUCCESSFUL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册