Subject: [Very RFC 45/46] powernv/pci: Remove requirement for a pdn in config accessors

From: Oliver O'Halloran <[email-masked]>
Date: Wed, 20 Nov 2019 12:28:58 +1100

:toot:

Signed-off-by: Oliver O'Halloran <[email-masked]>
---
 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