Commit 96bde06a2df1b363206d3cdef53134b84ff37813
Committed by
Greg Kroah-Hartman
1 parent
6ba186361e
Exists in
master
and in
7 other branches
pci: do not mark exported functions as __devinit
Functions marked __devinit will be removed after kernel init. But being exported they are potentially called by a module much later. So the safer choice seems to be to keep the function even in the non CONFIG_HOTPLUG case. This silence the follwoing section mismatch warnings: WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus' Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 6 changed files with 24 additions and 36 deletions Side-by-side Diff
drivers/pci/bus.c
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | * This adds a single pci device to the global |
78 | 78 | * device list and adds sysfs and procfs entries |
79 | 79 | */ |
80 | -int __devinit pci_bus_add_device(struct pci_dev *dev) | |
80 | +int pci_bus_add_device(struct pci_dev *dev) | |
81 | 81 | { |
82 | 82 | int retval; |
83 | 83 | retval = device_add(&dev->dev); |
... | ... | @@ -105,7 +105,7 @@ |
105 | 105 | * |
106 | 106 | * Call hotplug for each new devices. |
107 | 107 | */ |
108 | -void __devinit pci_bus_add_devices(struct pci_bus *bus) | |
108 | +void pci_bus_add_devices(struct pci_bus *bus) | |
109 | 109 | { |
110 | 110 | struct pci_dev *dev; |
111 | 111 | int retval; |
drivers/pci/pci.c
... | ... | @@ -35,8 +35,7 @@ |
35 | 35 | * Given a PCI bus, returns the highest PCI bus number present in the set |
36 | 36 | * including the given PCI bus and its list of child PCI buses. |
37 | 37 | */ |
38 | -unsigned char __devinit | |
39 | -pci_bus_max_busnr(struct pci_bus* bus) | |
38 | +unsigned char pci_bus_max_busnr(struct pci_bus* bus) | |
40 | 39 | { |
41 | 40 | struct list_head *tmp; |
42 | 41 | unsigned char max, n; |
drivers/pci/probe.c
... | ... | @@ -364,7 +364,7 @@ |
364 | 364 | } |
365 | 365 | } |
366 | 366 | |
367 | -static struct pci_bus * __devinit pci_alloc_bus(void) | |
367 | +static struct pci_bus * pci_alloc_bus(void) | |
368 | 368 | { |
369 | 369 | struct pci_bus *b; |
370 | 370 | |
... | ... | @@ -432,7 +432,7 @@ |
432 | 432 | return NULL; |
433 | 433 | } |
434 | 434 | |
435 | -struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) | |
435 | +struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) | |
436 | 436 | { |
437 | 437 | struct pci_bus *child; |
438 | 438 | |
... | ... | @@ -461,7 +461,7 @@ |
461 | 461 | pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl); |
462 | 462 | } |
463 | 463 | |
464 | -static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) | |
464 | +static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) | |
465 | 465 | { |
466 | 466 | struct pci_bus *parent = child->parent; |
467 | 467 | |
... | ... | @@ -477,7 +477,7 @@ |
477 | 477 | } |
478 | 478 | } |
479 | 479 | |
480 | -unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); | |
480 | +unsigned int pci_scan_child_bus(struct pci_bus *bus); | |
481 | 481 | |
482 | 482 | /* |
483 | 483 | * If it's a bridge, configure it and scan the bus behind it. |
... | ... | @@ -489,7 +489,7 @@ |
489 | 489 | * them, we proceed to assigning numbers to the remaining buses in |
490 | 490 | * order to avoid overlaps between old and new bus numbers. |
491 | 491 | */ |
492 | -int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass) | |
492 | +int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass) | |
493 | 493 | { |
494 | 494 | struct pci_bus *child; |
495 | 495 | int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); |
... | ... | @@ -912,7 +912,7 @@ |
912 | 912 | return dev; |
913 | 913 | } |
914 | 914 | |
915 | -void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) | |
915 | +void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) | |
916 | 916 | { |
917 | 917 | device_initialize(&dev->dev); |
918 | 918 | dev->dev.release = pci_release_dev; |
... | ... | @@ -935,8 +935,7 @@ |
935 | 935 | up_write(&pci_bus_sem); |
936 | 936 | } |
937 | 937 | |
938 | -struct pci_dev * __devinit | |
939 | -pci_scan_single_device(struct pci_bus *bus, int devfn) | |
938 | +struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn) | |
940 | 939 | { |
941 | 940 | struct pci_dev *dev; |
942 | 941 | |
... | ... | @@ -958,7 +957,7 @@ |
958 | 957 | * discovered devices to the @bus->devices list. New devices |
959 | 958 | * will have an empty dev->global_list head. |
960 | 959 | */ |
961 | -int __devinit pci_scan_slot(struct pci_bus *bus, int devfn) | |
960 | +int pci_scan_slot(struct pci_bus *bus, int devfn) | |
962 | 961 | { |
963 | 962 | int func, nr = 0; |
964 | 963 | int scan_all_fns; |
... | ... | @@ -991,7 +990,7 @@ |
991 | 990 | return nr; |
992 | 991 | } |
993 | 992 | |
994 | -unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) | |
993 | +unsigned int pci_scan_child_bus(struct pci_bus *bus) | |
995 | 994 | { |
996 | 995 | unsigned int devfn, pass, max = bus->secondary; |
997 | 996 | struct pci_dev *dev; |
... | ... | @@ -1041,7 +1040,7 @@ |
1041 | 1040 | return max; |
1042 | 1041 | } |
1043 | 1042 | |
1044 | -struct pci_bus * __devinit pci_create_bus(struct device *parent, | |
1043 | +struct pci_bus * pci_create_bus(struct device *parent, | |
1045 | 1044 | int bus, struct pci_ops *ops, void *sysdata) |
1046 | 1045 | { |
1047 | 1046 | int error; |
... | ... | @@ -1119,7 +1118,7 @@ |
1119 | 1118 | } |
1120 | 1119 | EXPORT_SYMBOL_GPL(pci_create_bus); |
1121 | 1120 | |
1122 | -struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, | |
1121 | +struct pci_bus *pci_scan_bus_parented(struct device *parent, | |
1123 | 1122 | int bus, struct pci_ops *ops, void *sysdata) |
1124 | 1123 | { |
1125 | 1124 | struct pci_bus *b; |
drivers/pci/search.c
... | ... | @@ -15,8 +15,7 @@ |
15 | 15 | |
16 | 16 | DECLARE_RWSEM(pci_bus_sem); |
17 | 17 | |
18 | -static struct pci_bus * | |
19 | -pci_do_find_bus(struct pci_bus* bus, unsigned char busnr) | |
18 | +static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) | |
20 | 19 | { |
21 | 20 | struct pci_bus* child; |
22 | 21 | struct list_head *tmp; |
drivers/pci/setup-bus.c
... | ... | @@ -36,8 +36,7 @@ |
36 | 36 | |
37 | 37 | #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) |
38 | 38 | |
39 | -static void __devinit | |
40 | -pbus_assign_resources_sorted(struct pci_bus *bus) | |
39 | +static void pbus_assign_resources_sorted(struct pci_bus *bus) | |
41 | 40 | { |
42 | 41 | struct pci_dev *dev; |
43 | 42 | struct resource *res; |
... | ... | @@ -220,8 +219,7 @@ |
220 | 219 | /* Check whether the bridge supports optional I/O and |
221 | 220 | prefetchable memory ranges. If not, the respective |
222 | 221 | base/limit registers must be read-only and read as 0. */ |
223 | -static void __devinit | |
224 | -pci_bridge_check_ranges(struct pci_bus *bus) | |
222 | +static void pci_bridge_check_ranges(struct pci_bus *bus) | |
225 | 223 | { |
226 | 224 | u16 io; |
227 | 225 | u32 pmem; |
... | ... | @@ -259,8 +257,7 @@ |
259 | 257 | bus resource of a given type. Note: we intentionally skip |
260 | 258 | the bus resources which have already been assigned (that is, |
261 | 259 | have non-NULL parent resource). */ |
262 | -static struct resource * __devinit | |
263 | -find_free_bus_resource(struct pci_bus *bus, unsigned long type) | |
260 | +static struct resource *find_free_bus_resource(struct pci_bus *bus, unsigned long type) | |
264 | 261 | { |
265 | 262 | int i; |
266 | 263 | struct resource *r; |
... | ... | @@ -281,8 +278,7 @@ |
281 | 278 | since these windows have 4K granularity and the IO ranges |
282 | 279 | of non-bridge PCI devices are limited to 256 bytes. |
283 | 280 | We must be careful with the ISA aliasing though. */ |
284 | -static void __devinit | |
285 | -pbus_size_io(struct pci_bus *bus) | |
281 | +static void pbus_size_io(struct pci_bus *bus) | |
286 | 282 | { |
287 | 283 | struct pci_dev *dev; |
288 | 284 | struct resource *b_res = find_free_bus_resource(bus, IORESOURCE_IO); |
... | ... | @@ -326,8 +322,7 @@ |
326 | 322 | |
327 | 323 | /* Calculate the size of the bus and minimal alignment which |
328 | 324 | guarantees that all child resources fit in this size. */ |
329 | -static int __devinit | |
330 | -pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type) | |
325 | +static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type) | |
331 | 326 | { |
332 | 327 | struct pci_dev *dev; |
333 | 328 | unsigned long min_align, align, size; |
... | ... | @@ -447,8 +442,7 @@ |
447 | 442 | } |
448 | 443 | } |
449 | 444 | |
450 | -void __devinit | |
451 | -pci_bus_size_bridges(struct pci_bus *bus) | |
445 | +void pci_bus_size_bridges(struct pci_bus *bus) | |
452 | 446 | { |
453 | 447 | struct pci_dev *dev; |
454 | 448 | unsigned long mask, prefmask; |
... | ... | @@ -498,8 +492,7 @@ |
498 | 492 | } |
499 | 493 | EXPORT_SYMBOL(pci_bus_size_bridges); |
500 | 494 | |
501 | -void __devinit | |
502 | -pci_bus_assign_resources(struct pci_bus *bus) | |
495 | +void pci_bus_assign_resources(struct pci_bus *bus) | |
503 | 496 | { |
504 | 497 | struct pci_bus *b; |
505 | 498 | struct pci_dev *dev; |
drivers/pci/setup-res.c
... | ... | @@ -101,8 +101,7 @@ |
101 | 101 | new & ~PCI_REGION_FLAG_MASK); |
102 | 102 | } |
103 | 103 | |
104 | -int __devinit | |
105 | -pci_claim_resource(struct pci_dev *dev, int resource) | |
104 | +int pci_claim_resource(struct pci_dev *dev, int resource) | |
106 | 105 | { |
107 | 106 | struct resource *res = &dev->resource[resource]; |
108 | 107 | struct resource *root = NULL; |
... | ... | @@ -212,8 +211,7 @@ |
212 | 211 | #endif |
213 | 212 | |
214 | 213 | /* Sort resources by alignment */ |
215 | -void __devinit | |
216 | -pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |
214 | +void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |
217 | 215 | { |
218 | 216 | int i; |
219 | 217 |