Commit 0ab2b57f8db8a1bcdf24089074f5d2856a3ffb42

Authored by Sam Ravnborg
Committed by Greg Kroah-Hartman
1 parent 415b6d0e89

PCI: fix section mismatch warning in pci_scan_child_bus

Fix following warning:
WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus()

We had plenty of functions that could be annotated __devinit but due to
the former restriction that exported symbols could not be annotated
they were not so.  So annotate these function and fix the references
from the pci/hotplug/* code to silence the resuting warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 6 changed files with 9 additions and 9 deletions Side-by-side Diff

drivers/pci/hotplug-pci.c
... ... @@ -4,7 +4,7 @@
4 4 #include "pci.h"
5 5  
6 6  
7   -unsigned int pci_do_scan_bus(struct pci_bus *bus)
  7 +unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
8 8 {
9 9 unsigned int max;
10 10  
drivers/pci/hotplug/acpiphp_glue.c
... ... @@ -1085,7 +1085,7 @@
1085 1085 * This function should be called per *physical slot*,
1086 1086 * not per each slot object in ACPI namespace.
1087 1087 */
1088   -static int enable_device(struct acpiphp_slot *slot)
  1088 +static int __ref enable_device(struct acpiphp_slot *slot)
1089 1089 {
1090 1090 struct pci_dev *dev;
1091 1091 struct pci_bus *bus = slot->bridge->pci_bus;
drivers/pci/hotplug/cpci_hotplug_pci.c
... ... @@ -250,7 +250,7 @@
250 250 * Device configuration functions
251 251 */
252 252  
253   -int cpci_configure_slot(struct slot* slot)
  253 +int __ref cpci_configure_slot(struct slot *slot)
254 254 {
255 255 struct pci_bus *parent;
256 256 int fn;
drivers/pci/hotplug/pciehp_pci.c
... ... @@ -167,7 +167,7 @@
167 167 }
168 168 }
169 169  
170   -static int pciehp_add_bridge(struct pci_dev *dev)
  170 +static int __ref pciehp_add_bridge(struct pci_dev *dev)
171 171 {
172 172 struct pci_bus *parent = dev->bus;
173 173 int pass, busnr, start = parent->secondary;
drivers/pci/hotplug/shpchp_pci.c
... ... @@ -96,7 +96,7 @@
96 96 }
97 97 }
98 98  
99   -int shpchp_configure_device(struct slot *p_slot)
  99 +int __ref shpchp_configure_device(struct slot *p_slot)
100 100 {
101 101 struct pci_dev *dev;
102 102 struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate;
... ... @@ -286,7 +286,7 @@
286 286 }
287 287 }
288 288  
289   -void pci_read_bridge_bases(struct pci_bus *child)
  289 +void __devinit pci_read_bridge_bases(struct pci_bus *child)
290 290 {
291 291 struct pci_dev *dev = child->self;
292 292 u8 io_base_lo, io_limit_lo;
... ... @@ -472,7 +472,7 @@
472 472 * them, we proceed to assigning numbers to the remaining buses in
473 473 * order to avoid overlaps between old and new bus numbers.
474 474 */
475   -int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass)
  475 +int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
476 476 {
477 477 struct pci_bus *child;
478 478 int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
... ... @@ -1008,7 +1008,7 @@
1008 1008 return nr;
1009 1009 }
1010 1010  
1011   -unsigned int pci_scan_child_bus(struct pci_bus *bus)
  1011 +unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
1012 1012 {
1013 1013 unsigned int devfn, pass, max = bus->secondary;
1014 1014 struct pci_dev *dev;
... ... @@ -1116,7 +1116,7 @@
1116 1116 return NULL;
1117 1117 }
1118 1118  
1119   -struct pci_bus *pci_scan_bus_parented(struct device *parent,
  1119 +struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent,
1120 1120 int bus, struct pci_ops *ops, void *sysdata)
1121 1121 {
1122 1122 struct pci_bus *b;