[PATCH 34/42]: ppc64: Remove duplicate code
Linas Vepstas
linas at linas.org
Fri Nov 4 11:54:29 EST 2005
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: Linas Vepstas <linas at austin.ibm.com>
Index: linux-2.6.14-git3/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- linux-2.6.14-git3.orig/arch/powerpc/platforms/pseries/eeh_driver.c 2005-11-02 14:41:18.435451353 -0600
+++ linux-2.6.14-git3/arch/powerpc/platforms/pseries/eeh_driver.c 2005-11-02 14:45:43.638259683 -0600
@@ -42,19 +42,6 @@
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
static void print_device_node_tree (struct pci_dn *pdn, int dent)
{
Index: linux-2.6.14-git3/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.14-git3.orig/arch/powerpc/platforms/pseries/eeh.c 2005-11-02 14:45:00.429319560 -0600
+++ linux-2.6.14-git3/arch/powerpc/platforms/pseries/eeh.c 2005-11-02 14:45:43.651257860 -0600
@@ -172,7 +172,7 @@
/**
* 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) &&
(PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) {
Index: linux-2.6.14-git3/include/asm-powerpc/ppc-pci.h
===================================================================
--- linux-2.6.14-git3.orig/include/asm-powerpc/ppc-pci.h 2005-11-02 14:42:38.998153856 -0600
+++ linux-2.6.14-git3/include/asm-powerpc/ppc-pci.h 2005-11-02 14:45:43.656257159 -0600
@@ -110,6 +110,9 @@
void eeh_mark_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 /* _ASM_POWERPC_PPC_PCI_H */
More information about the Linuxppc64-dev
mailing list