[Very RFC 45/46] powernv/pci: Remove requirement for a pdn in config accessors
Oliver O'Halloran
oohall at gmail.com
Wed Nov 20 12:28:58 AEDT 2019
:toot:
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
arch/powerpc/platforms/powernv/pci.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index 0eeea8652426..6383dcfec606 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -750,17 +750,12 @@ static int pnv_pci_read_config(struct pci_bus *bus,
unsigned int devfn,
int where, int size, u32 *val)
{
- struct pci_dn *pdn;
struct pnv_phb *phb = pci_bus_to_pnvhb(bus);
u16 bdfn = bus->number << 8 | devfn;
struct eeh_dev *edev;
int ret;
*val = 0xFFFFFFFF;
- pdn = pci_get_pdn_by_devfn(bus, devfn);
- if (!pdn)
- return PCIBIOS_DEVICE_NOT_FOUND;
-
edev = pnv_eeh_find_edev(phb, bdfn);
if (!pnv_eeh_pre_cfg_check(edev))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -781,16 +776,11 @@ static int pnv_pci_write_config(struct pci_bus *bus,
unsigned int devfn,
int where, int size, u32 val)
{
- struct pci_dn *pdn;
struct pnv_phb *phb = pci_bus_to_pnvhb(bus);
u16 bdfn = bus->number << 8 | devfn;
struct eeh_dev *edev;
int ret;
- pdn = pci_get_pdn_by_devfn(bus, devfn);
- if (!pdn)
- return PCIBIOS_DEVICE_NOT_FOUND;
-
edev = pnv_eeh_find_edev(phb, bdfn);
if (!pnv_eeh_pre_cfg_check(edev))
return PCIBIOS_DEVICE_NOT_FOUND;
--
2.21.0
More information about the Linuxppc-dev
mailing list