Subject: [Very RFC 14/46] powernv/eeh: Remove un-necessary call to eeh_add_device_early()

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

eeh_add_device_early() is used to initialise the EEH state for a PCI device
based on the contents of it's devicetree node. It doesn't do anything
unless EEH_FLAG_PROBE_MODE_DEVTREE is set and that only happens on pseries.

Remove the call to eeh_add_device_early() in the powernv code to squash
another pci_dn usage.

Signed-off-by: Oliver O'Halloran <[email-masked]>
---
 arch/powerpc/platforms/powernv/eeh-powernv.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 5250c4525544..aa2935a08464 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -40,13 +40,10 @@ static int eeh_event_irq = -EINVAL;
 
 void pnv_pcibios_bus_add_device(struct pci_dev *pdev)
 {
-	struct pci_dn *pdn = pci_get_pdn(pdev);
-
-	if (!pdn || eeh_has_flag(EEH_FORCE_DISABLED))
+	if (eeh_has_flag(EEH_FORCE_DISABLED))
 		return;
 
 	dev_dbg(&pdev->dev, "EEH: Setting up device\n");
-	eeh_add_device_early(pdn);
 	eeh_add_device_late(pdev);
 }
 
-- 
2.21.0