linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] powerpc: restore eeh_add_device_late() prototype
       [not found] <20060301001909.GU20175@ca-server1.us.oracle.com>
@ 2006-03-01  1:02 ` Mark Fasheh
  2006-03-01 16:35   ` [PATCH] move eeh_add_device_tree_late() John Rose
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Fasheh @ 2006-03-01  1:02 UTC (permalink / raw)
  To: paulus, johnrose; +Cc: linuxppc-dev, linux-kernel

Sigh, I forgot to actually CC linuxppc-dev@ozlabs.org, and I also left off
my signed-off-by line (added below). Sorry about that.

On Tue, Feb 28, 2006 at 04:19:09PM -0800, Mark Fasheh wrote:
A search on the linux-kernel, linuxppc-dev mailing lists and the git tree at
 git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc didn't show
this issue fixed or reported. If I missed something please ignore :)

I get a compile failure trying to build a powerpc kernel:

arch/powerpc/platforms/pseries/eeh.c: In function `eeh_add_device_tree_late':
arch/powerpc/platforms/pseries/eeh.c:901: warning: implicit declaration of function `eeh_add_device_late'
arch/powerpc/platforms/pseries/eeh.c: At top level:
arch/powerpc/platforms/pseries/eeh.c:918: error: conflicting types for 'eeh_add_device_late'
arch/powerpc/platforms/pseries/eeh.c:901: error: previous implicit declaration of 'eeh_add_device_late' was here
make[2]: *** [arch/powerpc/platforms/pseries/eeh.o] Error 1

It seems commit 827c1a6c1a5dcb2902fecfb648f9af6a532934eb removed this
prototype from eeh.h. The following patch restores it.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>

diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index 7dfb408..4250fa1 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -62,6 +62,7 @@ void __init pci_addr_cache_build(void);
  */
 void eeh_add_device_early(struct device_node *);
 void eeh_add_device_tree_early(struct device_node *);
+void eeh_add_device_late(struct pci_dev *);
 void eeh_add_device_tree_late(struct pci_bus *);
 
 /**
@@ -117,6 +118,8 @@ static inline void pci_addr_cache_build(
 
 static inline void eeh_add_device_early(struct device_node *dn) { }
 
+static inline void eeh_add_device_late(struct pci_dev *dev) { }
+
 static inline void eeh_remove_device(struct pci_dev *dev) { }
 
 static inline void eeh_add_device_tree_early(struct device_node *dn) { }

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] move eeh_add_device_tree_late()
  2006-03-01  1:02 ` [PATCH] powerpc: restore eeh_add_device_late() prototype Mark Fasheh
@ 2006-03-01 16:35   ` John Rose
  2006-03-01 17:59     ` Mark Fasheh
  0 siblings, 1 reply; 4+ messages in thread
From: John Rose @ 2006-03-01 16:35 UTC (permalink / raw)
  To: Mark Fasheh; +Cc: linuxppc-dev, lkml

Good catch, Mark.

Commit 827c1a6c1a5dcb2902fecfb648f9af6a532934eb introduced a new
function that calls eeh_add_device_late() implicitly.  This patch
reorders the two functions in question to fix the compile error.  This
might be preferable to exposing eeh_add_device_late() in eeh.h.

Apologies Paul/everyone, please don't kill me.

Thanks-
John

Signed-off-by: John Rose <johnrose@austin.ibm.com>

diff -puN arch/powerpc/platforms/pseries/eeh.c~fix_eeh_bb arch/powerpc/platforms/pseries/eeh.c
--- 2_6_linus_3/arch/powerpc/platforms/pseries/eeh.c~fix_eeh_bb	2006-03-01 10:30:52.000000000 -0600
+++ 2_6_linus_3-johnrose/arch/powerpc/platforms/pseries/eeh.c	2006-03-01 10:31:28.000000000 -0600
@@ -893,20 +893,6 @@ void eeh_add_device_tree_early(struct de
 }
 EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
 
-void eeh_add_device_tree_late(struct pci_bus *bus)
-{
-	struct pci_dev *dev;
-
-	list_for_each_entry(dev, &bus->devices, bus_list) {
- 		eeh_add_device_late(dev);
- 		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
- 			struct pci_bus *subbus = dev->subordinate;
- 			if (subbus)
- 				eeh_add_device_tree_late(subbus);
- 		}
-	}
-}
-
 /**
  * eeh_add_device_late - perform EEH initialization for the indicated pci device
  * @dev: pci device for which to set up EEH
@@ -935,6 +921,20 @@ void eeh_add_device_late(struct pci_dev 
 }
 EXPORT_SYMBOL_GPL(eeh_add_device_late);
 
+void eeh_add_device_tree_late(struct pci_bus *bus)
+{
+	struct pci_dev *dev;
+
+	list_for_each_entry(dev, &bus->devices, bus_list) {
+ 		eeh_add_device_late(dev);
+ 		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+ 			struct pci_bus *subbus = dev->subordinate;
+ 			if (subbus)
+ 				eeh_add_device_tree_late(subbus);
+ 		}
+	}
+}
+
 /**
  * eeh_remove_device - undo EEH setup for the indicated pci device
  * @dev: pci device to be removed

_

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] move eeh_add_device_tree_late()
  2006-03-01 16:35   ` [PATCH] move eeh_add_device_tree_late() John Rose
@ 2006-03-01 17:59     ` Mark Fasheh
  2006-03-01 18:57       ` John Rose
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Fasheh @ 2006-03-01 17:59 UTC (permalink / raw)
  To: John Rose; +Cc: linuxppc-dev, lkml

On Wed, Mar 01, 2006 at 10:35:55AM -0600, John Rose wrote:
> Good catch, Mark.
Heh, thanks.

> Commit 827c1a6c1a5dcb2902fecfb648f9af6a532934eb introduced a new
> function that calls eeh_add_device_late() implicitly.  This patch
> reorders the two functions in question to fix the compile error.  This
> might be preferable to exposing eeh_add_device_late() in eeh.h.
Hmm, you still left the EXPORT_SYMBOL(eeh_add_device_late) and you didn't
make eeh_add_device_late() static. Shouldn't you do that if you don't want
to make it accessible outside of eeh.c?
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] move eeh_add_device_tree_late()
  2006-03-01 17:59     ` Mark Fasheh
@ 2006-03-01 18:57       ` John Rose
  0 siblings, 0 replies; 4+ messages in thread
From: John Rose @ 2006-03-01 18:57 UTC (permalink / raw)
  To: Mark Fasheh; +Cc: linuxppc-dev, lkml

> Hmm, you still left the EXPORT_SYMBOL(eeh_add_device_late) and you didn't
> make eeh_add_device_late() static. Shouldn't you do that if you don't want
> to make it accessible outside of eeh.c?
> 	--Mark

Again, good points.  Ever have one of those days?  Take 2.

Commit 827c1a6c1a5dcb2902fecfb648f9af6a532934eb introduced a new
function that calls eeh_add_device_late() implicitly.  This patch
reorders the two functions in question to fix the compile error.  This
might be preferable to exposing eeh_add_device_late() in eeh.h.

Thanks-
John

Signed-off-by: John Rose <johnrose@austin.ibm.com>

diff -puN arch/powerpc/platforms/pseries/eeh.c~fix_eeh_bb arch/powerpc/platforms/pseries/eeh.c
--- 2_6_linus_3/arch/powerpc/platforms/pseries/eeh.c~fix_eeh_bb	2006-03-01 10:30:52.000000000 -0600
+++ 2_6_linus_3-johnrose/arch/powerpc/platforms/pseries/eeh.c	2006-03-01 12:54:03.000000000 -0600
@@ -893,20 +893,6 @@ void eeh_add_device_tree_early(struct de
 }
 EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
 
-void eeh_add_device_tree_late(struct pci_bus *bus)
-{
-	struct pci_dev *dev;
-
-	list_for_each_entry(dev, &bus->devices, bus_list) {
- 		eeh_add_device_late(dev);
- 		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
- 			struct pci_bus *subbus = dev->subordinate;
- 			if (subbus)
- 				eeh_add_device_tree_late(subbus);
- 		}
-	}
-}
-
 /**
  * eeh_add_device_late - perform EEH initialization for the indicated pci device
  * @dev: pci device for which to set up EEH
@@ -914,7 +900,7 @@ void eeh_add_device_tree_late(struct pci
  * This routine must be used to complete EEH initialization for PCI
  * devices that were added after system boot (e.g. hotplug, dlpar).
  */
-void eeh_add_device_late(struct pci_dev *dev)
+static void eeh_add_device_late(struct pci_dev *dev)
 {
 	struct device_node *dn;
 	struct pci_dn *pdn;
@@ -933,7 +919,20 @@ void eeh_add_device_late(struct pci_dev 
 
 	pci_addr_cache_insert_device (dev);
 }
-EXPORT_SYMBOL_GPL(eeh_add_device_late);
+
+void eeh_add_device_tree_late(struct pci_bus *bus)
+{
+	struct pci_dev *dev;
+
+	list_for_each_entry(dev, &bus->devices, bus_list) {
+ 		eeh_add_device_late(dev);
+ 		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+ 			struct pci_bus *subbus = dev->subordinate;
+ 			if (subbus)
+ 				eeh_add_device_tree_late(subbus);
+ 		}
+	}
+}
 
 /**
  * eeh_remove_device - undo EEH setup for the indicated pci device

_

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-01 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060301001909.GU20175@ca-server1.us.oracle.com>
2006-03-01  1:02 ` [PATCH] powerpc: restore eeh_add_device_late() prototype Mark Fasheh
2006-03-01 16:35   ` [PATCH] move eeh_add_device_tree_late() John Rose
2006-03-01 17:59     ` Mark Fasheh
2006-03-01 18:57       ` John Rose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).