Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Remove unnecessary __ref annotations

Some PCI functions used to be marked __devinit. When CONFIG_HOTPLUG was
not set, these functions were discarded after boot. A few callers of these
__devinit functions were marked __ref to indicate that they could safely
call the __devinit functions even though the callers were not __devinit.

But CONFIG_HOTPLUG and __devinit are now gone, and the need for the __ref
annotations is also gone, so remove them. Relevant historical commits:

54b956b90360 Remove __dev* markings from init.h
a8e4b9c101ae PCI: add generic pci_hp_add_bridge()
0ab2b57f8db8 PCI: fix section mismatch warning in pci_scan_child_bus
451124a7cc6c PCI: fix 4x section mismatch warnings

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

+24 -25
+1 -1
drivers/pci/hotplug-pci.c
··· 4 4 #include <linux/export.h> 5 5 #include "pci.h" 6 6 7 - int __ref pci_hp_add_bridge(struct pci_dev *dev) 7 + int pci_hp_add_bridge(struct pci_dev *dev) 8 8 { 9 9 struct pci_bus *parent = dev->bus; 10 10 int pass, busnr, start = parent->busn_res.start;
+1 -1
drivers/pci/hotplug/acpiphp_glue.c
··· 500 500 * This function should be called per *physical slot*, 501 501 * not per each slot object in ACPI namespace. 502 502 */ 503 - static void __ref enable_slot(struct acpiphp_slot *slot) 503 + static void enable_slot(struct acpiphp_slot *slot) 504 504 { 505 505 struct pci_dev *dev; 506 506 struct pci_bus *bus = slot->bus;
+1 -1
drivers/pci/hotplug/cpci_hotplug_pci.c
··· 250 250 * Device configuration functions 251 251 */ 252 252 253 - int __ref cpci_configure_slot(struct slot *slot) 253 + int cpci_configure_slot(struct slot *slot) 254 254 { 255 255 struct pci_dev *dev; 256 256 struct pci_bus *parent;
+1 -1
drivers/pci/hotplug/shpchp_pci.c
··· 34 34 #include "../pci.h" 35 35 #include "shpchp.h" 36 36 37 - int __ref shpchp_configure_device(struct slot *p_slot) 37 + int shpchp_configure_device(struct slot *p_slot) 38 38 { 39 39 struct pci_dev *dev; 40 40 struct controller *ctrl = p_slot->ctrl;
+4 -4
drivers/pci/pci.h
··· 201 201 struct resource *res, unsigned int reg); 202 202 int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); 203 203 void pci_configure_ari(struct pci_dev *dev); 204 - void __ref __pci_bus_size_bridges(struct pci_bus *bus, 204 + void __pci_bus_size_bridges(struct pci_bus *bus, 205 205 struct list_head *realloc_head); 206 - void __ref __pci_bus_assign_resources(const struct pci_bus *bus, 207 - struct list_head *realloc_head, 208 - struct list_head *fail_head); 206 + void __pci_bus_assign_resources(const struct pci_bus *bus, 207 + struct list_head *realloc_head, 208 + struct list_head *fail_head); 209 209 210 210 /** 211 211 * pci_ari_enabled - query ARI forwarding status
+4 -4
drivers/pci/probe.c
··· 719 719 return child; 720 720 } 721 721 722 - struct pci_bus *__ref pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) 722 + struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) 723 723 { 724 724 struct pci_bus *child; 725 725 ··· 1369 1369 WARN_ON(ret < 0); 1370 1370 } 1371 1371 1372 - struct pci_dev *__ref pci_scan_single_device(struct pci_bus *bus, int devfn) 1372 + struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn) 1373 1373 { 1374 1374 struct pci_dev *dev; 1375 1375 ··· 1958 1958 * 1959 1959 * Returns the max number of subordinate bus discovered. 1960 1960 */ 1961 - unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge) 1961 + unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge) 1962 1962 { 1963 1963 unsigned int max; 1964 1964 struct pci_bus *bus = bridge->subordinate; ··· 1981 1981 * 1982 1982 * Returns the max number of subordinate bus discovered. 1983 1983 */ 1984 - unsigned int __ref pci_rescan_bus(struct pci_bus *bus) 1984 + unsigned int pci_rescan_bus(struct pci_bus *bus) 1985 1985 { 1986 1986 unsigned int max; 1987 1987
+12 -13
drivers/pci/setup-bus.c
··· 1113 1113 ; 1114 1114 } 1115 1115 1116 - void __ref __pci_bus_size_bridges(struct pci_bus *bus, 1117 - struct list_head *realloc_head) 1116 + void __pci_bus_size_bridges(struct pci_bus *bus, struct list_head *realloc_head) 1118 1117 { 1119 1118 struct pci_dev *dev; 1120 1119 unsigned long mask, prefmask; ··· 1177 1178 } 1178 1179 } 1179 1180 1180 - void __ref pci_bus_size_bridges(struct pci_bus *bus) 1181 + void pci_bus_size_bridges(struct pci_bus *bus) 1181 1182 { 1182 1183 __pci_bus_size_bridges(bus, NULL); 1183 1184 } 1184 1185 EXPORT_SYMBOL(pci_bus_size_bridges); 1185 1186 1186 - void __ref __pci_bus_assign_resources(const struct pci_bus *bus, 1187 - struct list_head *realloc_head, 1188 - struct list_head *fail_head) 1187 + void __pci_bus_assign_resources(const struct pci_bus *bus, 1188 + struct list_head *realloc_head, 1189 + struct list_head *fail_head) 1189 1190 { 1190 1191 struct pci_bus *b; 1191 1192 struct pci_dev *dev; ··· 1217 1218 } 1218 1219 } 1219 1220 1220 - void __ref pci_bus_assign_resources(const struct pci_bus *bus) 1221 + void pci_bus_assign_resources(const struct pci_bus *bus) 1221 1222 { 1222 1223 __pci_bus_assign_resources(bus, NULL, NULL); 1223 1224 } 1224 1225 EXPORT_SYMBOL(pci_bus_assign_resources); 1225 1226 1226 - static void __ref __pci_bridge_assign_resources(const struct pci_dev *bridge, 1227 - struct list_head *add_head, 1228 - struct list_head *fail_head) 1227 + static void __pci_bridge_assign_resources(const struct pci_dev *bridge, 1228 + struct list_head *add_head, 1229 + struct list_head *fail_head) 1229 1230 { 1230 1231 struct pci_bus *b; 1231 1232 ··· 1303 1304 * try to release pci bridge resources that is from leaf bridge, 1304 1305 * so we can allocate big new one later 1305 1306 */ 1306 - static void __ref pci_bus_release_bridge_resources(struct pci_bus *bus, 1307 - unsigned long type, 1308 - enum release_type rel_type) 1307 + static void pci_bus_release_bridge_resources(struct pci_bus *bus, 1308 + unsigned long type, 1309 + enum release_type rel_type) 1309 1310 { 1310 1311 struct pci_dev *dev; 1311 1312 bool is_leaf_bridge = true;