Commit 9fb40eb8 authored by Linas Vepstas's avatar Linas Vepstas Committed by Paul Mackerras

[PATCH] powerpc: Remove duplicate code

234-eeh-find-pe.patch

The find_device_pe() routine is duplicated in two files. Remove one of
the two copies, declare the other extern.
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
(cherry picked from 48408e708282d4d0269136ff27ea5acbd9410b5a commit)
parent f751f841
...@@ -172,7 +172,7 @@ static inline unsigned long eeh_token_to_phys(unsigned long token) ...@@ -172,7 +172,7 @@ static inline unsigned long eeh_token_to_phys(unsigned long token)
/** /**
* Return the "partitionable endpoint" (pe) under which this device lies * Return the "partitionable endpoint" (pe) under which this device lies
*/ */
static struct device_node * find_device_pe(struct device_node *dn) struct device_node * find_device_pe(struct device_node *dn)
{ {
while ((dn->parent) && PCI_DN(dn->parent) && while ((dn->parent) && PCI_DN(dn->parent) &&
(PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) { (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
......
...@@ -42,19 +42,6 @@ static inline const char * pcid_name (struct pci_dev *pdev) ...@@ -42,19 +42,6 @@ static inline const char * pcid_name (struct pci_dev *pdev)
return ""; return "";
} }
/**
* Return the "partitionable endpoint" (pe) under which this device lies
*/
static struct device_node * find_device_pe(struct device_node *dn)
{
while ((dn->parent) && PCI_DN(dn->parent) &&
(PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
dn = dn->parent;
}
return dn;
}
#ifdef DEBUG #ifdef DEBUG
static void print_device_node_tree (struct pci_dn *pdn, int dent) static void print_device_node_tree (struct pci_dn *pdn, int dent)
{ {
......
...@@ -109,6 +109,9 @@ int rtas_write_config(struct pci_dn *, int where, int size, u32 val); ...@@ -109,6 +109,9 @@ int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
void eeh_mark_slot (struct device_node *dn, int mode_flag); void eeh_mark_slot (struct device_node *dn, int mode_flag);
void eeh_clear_slot (struct device_node *dn, int mode_flag); void eeh_clear_slot (struct device_node *dn, int mode_flag);
/* Find the associated "Partiationable Endpoint" PE */
struct device_node * find_device_pe(struct device_node *dn);
#endif #endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
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