powerpc: restore eeh_add_device_late() prototype
Subsystems (2)
PATCH 1/1 powerpc: restore eeh_add_device_late() prototype
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.
--Mark
include/asm-powerpc/eeh.h +3 -0
@@ -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) { }
Sigh, I forgot to actually CC [email protected], 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.
include/asm-powerpc/eeh.h +3 -0
@@ -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) { }
PATCH 1/1 move eeh_add_device_tree_late()
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
arch/powerpc/platforms/pseries/eeh.c renamed from arch/powerpc/platforms/pseries/eeh.c~fix_eeh_bb +14 -14
@@ -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
_
Re: [PATCH] move eeh_add_device_tree_late()
Quoted 1 line · John Rose
Good catch, Mark.
Heh, thanks.
Quoted 4 lines
Commit
827c1a6c1a5dcb2902fecfb648f9af6a532934ebintroduced a new function that callseeh_add_device_late()implicitly. This patch reorders the two functions in question to fix the compile error. This might be preferable to exposingeeh_add_device_late()ineeh.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
[email protected]
PATCH 1/1 move eeh_add_device_tree_late()
Quoted 4 lines
Hmm, you still left the
EXPORT_SYMBOL(eeh_add_device_late)and you didn't makeeeh_add_device_late()static. Shouldn't you do that if you don't want to make it accessible outside ofeeh.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
arch/powerpc/platforms/pseries/eeh.c renamed from arch/powerpc/platforms/pseries/eeh.c~fix_eeh_bb +15 -16
@@ -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_devpci_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
_