Commit 0ab2b57f8db8a1bcdf24089074f5d2856a3ffb42
Committed by
Greg Kroah-Hartman
1 parent
415b6d0e89
Exists in
master
and in
4 other branches
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
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
drivers/pci/hotplug/pciehp_pci.c
drivers/pci/hotplug/shpchp_pci.c
drivers/pci/probe.c
... | ... | @@ -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; |