diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-02-02 16:33:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-02 18:08:04 -0500 |
commit | 451124a7cc6c89fcb83d48082c7290f16f652f1c (patch) | |
tree | e81340f0d9e83f5447d60418972a064c888463c9 /drivers/pci/setup-bus.c | |
parent | 4105717bc98ba01663ff28f8a16d8716ba9d07fe (diff) |
PCI: fix 4x section mismatch warnings
The following warnings were issued during build of
drivers/pci with an allyesconfig build:
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xdaf): Section mismatch in reference from the function pci_add_new_bus() to the function .devinit.text:pci_alloc_child_bus()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x15e2): Section mismatch in reference from the function pci_scan_single_device() to the function .devinit.text:pci_scan_device()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b0c5): Section mismatch in reference from the function pci_bus_assign_resources() to the function .devinit.text:pci_setup_bridge()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b32d): Section mismatch in reference from the function pci_bus_size_bridges() to the function .devinit.text:pci_bus_size_cardbus()
Investigating each case closer it looked like all
referred functions are only used in the init phase
or during hotplug.
So to avoid wasting too much memory in the non-hotplug
case the simpler fix was to allow the fuctions to
use code/data from the __devinit sections.
This was done in all four case by adding the __ref
annotation.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8a7232feb553..262b0439abe9 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -456,7 +456,7 @@ pci_bus_size_cardbus(struct pci_bus *bus) | |||
456 | } | 456 | } |
457 | } | 457 | } |
458 | 458 | ||
459 | void pci_bus_size_bridges(struct pci_bus *bus) | 459 | void __ref pci_bus_size_bridges(struct pci_bus *bus) |
460 | { | 460 | { |
461 | struct pci_dev *dev; | 461 | struct pci_dev *dev; |
462 | unsigned long mask, prefmask; | 462 | unsigned long mask, prefmask; |
@@ -511,7 +511,7 @@ void pci_bus_size_bridges(struct pci_bus *bus) | |||
511 | } | 511 | } |
512 | EXPORT_SYMBOL(pci_bus_size_bridges); | 512 | EXPORT_SYMBOL(pci_bus_size_bridges); |
513 | 513 | ||
514 | void pci_bus_assign_resources(struct pci_bus *bus) | 514 | void __ref pci_bus_assign_resources(struct pci_bus *bus) |
515 | { | 515 | { |
516 | struct pci_bus *b; | 516 | struct pci_bus *b; |
517 | struct pci_dev *dev; | 517 | struct pci_dev *dev; |