Commit 475028ef authored by Oliver O'Halloran's avatar Oliver O'Halloran Committed by Michael Ellerman

powerpc/eeh: Remove eeh_dev_phb_init_dynamic()

This function is a one line wrapper around eeh_phb_pe_create() and despite
the name it doesn't create any eeh_dev structures. Replace it with direct
calls to eeh_phb_pe_create() since that does what it says on the tin
and removes a layer of indirection.
Signed-off-by: default avatarOliver O'Halloran <oohall@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200725081231.39076-1-oohall@gmail.com
parent 3f31e49d
...@@ -294,7 +294,6 @@ const char *eeh_pe_loc_get(struct eeh_pe *pe); ...@@ -294,7 +294,6 @@ const char *eeh_pe_loc_get(struct eeh_pe *pe);
struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe); struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe);
struct eeh_dev *eeh_dev_init(struct pci_dn *pdn); struct eeh_dev *eeh_dev_init(struct pci_dn *pdn);
void eeh_dev_phb_init_dynamic(struct pci_controller *phb);
void eeh_show_enabled(void); void eeh_show_enabled(void);
int __init eeh_ops_register(struct eeh_ops *ops); int __init eeh_ops_register(struct eeh_ops *ops);
int __exit eeh_ops_unregister(const char *name); int __exit eeh_ops_unregister(const char *name);
...@@ -362,6 +361,7 @@ static inline void eeh_remove_device(struct pci_dev *dev) { } ...@@ -362,6 +361,7 @@ static inline void eeh_remove_device(struct pci_dev *dev) { }
#define EEH_POSSIBLE_ERROR(val, type) (0) #define EEH_POSSIBLE_ERROR(val, type) (0)
#define EEH_IO_ERROR_VALUE(size) (-1UL) #define EEH_IO_ERROR_VALUE(size) (-1UL)
static inline int eeh_phb_pe_create(struct pci_controller *phb) { return 0; }
#endif /* CONFIG_EEH */ #endif /* CONFIG_EEH */
#if defined(CONFIG_PPC_PSERIES) && defined(CONFIG_EEH) #if defined(CONFIG_PPC_PSERIES) && defined(CONFIG_EEH)
......
...@@ -1096,7 +1096,7 @@ static int eeh_init(void) ...@@ -1096,7 +1096,7 @@ static int eeh_init(void)
/* Initialize PHB PEs */ /* Initialize PHB PEs */
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
eeh_dev_phb_init_dynamic(hose); eeh_phb_pe_create(hose);
eeh_addr_cache_init(); eeh_addr_cache_init();
......
...@@ -52,16 +52,3 @@ struct eeh_dev *eeh_dev_init(struct pci_dn *pdn) ...@@ -52,16 +52,3 @@ struct eeh_dev *eeh_dev_init(struct pci_dn *pdn)
return edev; return edev;
} }
/**
* eeh_dev_phb_init_dynamic - Create EEH devices for devices included in PHB
* @phb: PHB
*
* Scan the PHB OF node and its child association, then create the
* EEH devices accordingly
*/
void eeh_dev_phb_init_dynamic(struct pci_controller *phb)
{
/* EEH PE for PHB */
eeh_phb_pe_create(phb);
}
...@@ -62,8 +62,8 @@ static int of_pci_phb_probe(struct platform_device *dev) ...@@ -62,8 +62,8 @@ static int of_pci_phb_probe(struct platform_device *dev)
/* Init pci_dn data structures */ /* Init pci_dn data structures */
pci_devs_phb_init_dynamic(phb); pci_devs_phb_init_dynamic(phb);
/* Create EEH PEs for the PHB */ /* Create EEH PE for the PHB */
eeh_dev_phb_init_dynamic(phb); eeh_phb_pe_create(phb);
/* Scan the bus */ /* Scan the bus */
pcibios_scan_phb(phb); pcibios_scan_phb(phb);
......
...@@ -34,7 +34,7 @@ struct pci_controller *init_phb_dynamic(struct device_node *dn) ...@@ -34,7 +34,7 @@ struct pci_controller *init_phb_dynamic(struct device_node *dn)
pci_devs_phb_init_dynamic(phb); pci_devs_phb_init_dynamic(phb);
/* Create EEH devices for the PHB */ /* Create EEH devices for the PHB */
eeh_dev_phb_init_dynamic(phb); eeh_phb_pe_create(phb);
if (dn->child) if (dn->child)
pseries_eeh_init_edev_recursive(PCI_DN(dn)); pseries_eeh_init_edev_recursive(PCI_DN(dn));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment