aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-04-14 18:11:40 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-04-29 19:36:44 -0400
commit10874f5a00266343a06e95da680e8a5a383d9a80 (patch)
tree541dabfbf3bf3e8dc3419e8a643d7b7db7b83a79
parent8895d3bcb8ba960b1b83f95d772b641352ea8e51 (diff)
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>
-rw-r--r--drivers/pci/hotplug-pci.c2
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c2
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_pci.c2
-rw-r--r--drivers/pci/hotplug/shpchp_pci.c2
-rw-r--r--drivers/pci/pci.h8
-rw-r--r--drivers/pci/probe.c8
-rw-r--r--drivers/pci/setup-bus.c25
7 files changed, 24 insertions, 25 deletions
diff --git a/drivers/pci/hotplug-pci.c b/drivers/pci/hotplug-pci.c
index 6258dc260d9f..c68366cee6b7 100644
--- a/drivers/pci/hotplug-pci.c
+++ b/drivers/pci/hotplug-pci.c
@@ -4,7 +4,7 @@
4#include <linux/export.h> 4#include <linux/export.h>
5#include "pci.h" 5#include "pci.h"
6 6
7int __ref pci_hp_add_bridge(struct pci_dev *dev) 7int pci_hp_add_bridge(struct pci_dev *dev)
8{ 8{
9 struct pci_bus *parent = dev->bus; 9 struct pci_bus *parent = dev->bus;
10 int pass, busnr, start = parent->busn_res.start; 10 int pass, busnr, start = parent->busn_res.start;
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 0238a02b4cb3..bb945e33b1ec 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -500,7 +500,7 @@ static int acpiphp_rescan_slot(struct acpiphp_slot *slot)
500 * This function should be called per *physical slot*, 500 * This function should be called per *physical slot*,
501 * not per each slot object in ACPI namespace. 501 * not per each slot object in ACPI namespace.
502 */ 502 */
503static void __ref enable_slot(struct acpiphp_slot *slot) 503static void enable_slot(struct acpiphp_slot *slot)
504{ 504{
505 struct pci_dev *dev; 505 struct pci_dev *dev;
506 struct pci_bus *bus = slot->bus; 506 struct pci_bus *bus = slot->bus;
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index 8c1464851768..b238a1a28372 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -250,7 +250,7 @@ int cpci_led_off(struct slot* slot)
250 * Device configuration functions 250 * Device configuration functions
251 */ 251 */
252 252
253int __ref cpci_configure_slot(struct slot *slot) 253int cpci_configure_slot(struct slot *slot)
254{ 254{
255 struct pci_dev *dev; 255 struct pci_dev *dev;
256 struct pci_bus *parent; 256 struct pci_bus *parent;
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c
index 2bf69fe1926c..18209ebc0979 100644
--- a/drivers/pci/hotplug/shpchp_pci.c
+++ b/drivers/pci/hotplug/shpchp_pci.c
@@ -34,7 +34,7 @@
34#include "../pci.h" 34#include "../pci.h"
35#include "shpchp.h" 35#include "shpchp.h"
36 36
37int __ref shpchp_configure_device(struct slot *p_slot) 37int shpchp_configure_device(struct slot *p_slot)
38{ 38{
39 struct pci_dev *dev; 39 struct pci_dev *dev;
40 struct controller *ctrl = p_slot->ctrl; 40 struct controller *ctrl = p_slot->ctrl;
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 6bd082299e31..fe233a3099cf 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -201,11 +201,11 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
201 struct resource *res, unsigned int reg); 201 struct resource *res, unsigned int reg);
202int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); 202int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type);
203void pci_configure_ari(struct pci_dev *dev); 203void pci_configure_ari(struct pci_dev *dev);
204void __ref __pci_bus_size_bridges(struct pci_bus *bus, 204void __pci_bus_size_bridges(struct pci_bus *bus,
205 struct list_head *realloc_head); 205 struct list_head *realloc_head);
206void __ref __pci_bus_assign_resources(const struct pci_bus *bus, 206void __pci_bus_assign_resources(const struct pci_bus *bus,
207 struct list_head *realloc_head, 207 struct list_head *realloc_head,
208 struct list_head *fail_head); 208 struct list_head *fail_head);
209 209
210/** 210/**
211 * pci_ari_enabled - query ARI forwarding status 211 * pci_ari_enabled - query ARI forwarding status
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index ef09f5f2fe6c..fe89a982a3da 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -719,7 +719,7 @@ add_dev:
719 return child; 719 return child;
720} 720}
721 721
722struct pci_bus *__ref pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) 722struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr)
723{ 723{
724 struct pci_bus *child; 724 struct pci_bus *child;
725 725
@@ -1369,7 +1369,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
1369 WARN_ON(ret < 0); 1369 WARN_ON(ret < 0);
1370} 1370}
1371 1371
1372struct pci_dev *__ref pci_scan_single_device(struct pci_bus *bus, int devfn) 1372struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn)
1373{ 1373{
1374 struct pci_dev *dev; 1374 struct pci_dev *dev;
1375 1375
@@ -1958,7 +1958,7 @@ EXPORT_SYMBOL(pci_scan_bus);
1958 * 1958 *
1959 * Returns the max number of subordinate bus discovered. 1959 * Returns the max number of subordinate bus discovered.
1960 */ 1960 */
1961unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge) 1961unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
1962{ 1962{
1963 unsigned int max; 1963 unsigned int max;
1964 struct pci_bus *bus = bridge->subordinate; 1964 struct pci_bus *bus = bridge->subordinate;
@@ -1981,7 +1981,7 @@ unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
1981 * 1981 *
1982 * Returns the max number of subordinate bus discovered. 1982 * Returns the max number of subordinate bus discovered.
1983 */ 1983 */
1984unsigned int __ref pci_rescan_bus(struct pci_bus *bus) 1984unsigned int pci_rescan_bus(struct pci_bus *bus)
1985{ 1985{
1986 unsigned int max; 1986 unsigned int max;
1987 1987
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 138bdd6393be..d219d44709b2 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1113,8 +1113,7 @@ handle_done:
1113 ; 1113 ;
1114} 1114}
1115 1115
1116void __ref __pci_bus_size_bridges(struct pci_bus *bus, 1116void __pci_bus_size_bridges(struct pci_bus *bus, struct list_head *realloc_head)
1117 struct list_head *realloc_head)
1118{ 1117{
1119 struct pci_dev *dev; 1118 struct pci_dev *dev;
1120 unsigned long mask, prefmask; 1119 unsigned long mask, prefmask;
@@ -1178,15 +1177,15 @@ void __ref __pci_bus_size_bridges(struct pci_bus *bus,
1178 } 1177 }
1179} 1178}
1180 1179
1181void __ref pci_bus_size_bridges(struct pci_bus *bus) 1180void pci_bus_size_bridges(struct pci_bus *bus)
1182{ 1181{
1183 __pci_bus_size_bridges(bus, NULL); 1182 __pci_bus_size_bridges(bus, NULL);
1184} 1183}
1185EXPORT_SYMBOL(pci_bus_size_bridges); 1184EXPORT_SYMBOL(pci_bus_size_bridges);
1186 1185
1187void __ref __pci_bus_assign_resources(const struct pci_bus *bus, 1186void __pci_bus_assign_resources(const struct pci_bus *bus,
1188 struct list_head *realloc_head, 1187 struct list_head *realloc_head,
1189 struct list_head *fail_head) 1188 struct list_head *fail_head)
1190{ 1189{
1191 struct pci_bus *b; 1190 struct pci_bus *b;
1192 struct pci_dev *dev; 1191 struct pci_dev *dev;
@@ -1218,15 +1217,15 @@ void __ref __pci_bus_assign_resources(const struct pci_bus *bus,
1218 } 1217 }
1219} 1218}
1220 1219
1221void __ref pci_bus_assign_resources(const struct pci_bus *bus) 1220void pci_bus_assign_resources(const struct pci_bus *bus)
1222{ 1221{
1223 __pci_bus_assign_resources(bus, NULL, NULL); 1222 __pci_bus_assign_resources(bus, NULL, NULL);
1224} 1223}
1225EXPORT_SYMBOL(pci_bus_assign_resources); 1224EXPORT_SYMBOL(pci_bus_assign_resources);
1226 1225
1227static void __ref __pci_bridge_assign_resources(const struct pci_dev *bridge, 1226static void __pci_bridge_assign_resources(const struct pci_dev *bridge,
1228 struct list_head *add_head, 1227 struct list_head *add_head,
1229 struct list_head *fail_head) 1228 struct list_head *fail_head)
1230{ 1229{
1231 struct pci_bus *b; 1230 struct pci_bus *b;
1232 1231
@@ -1304,9 +1303,9 @@ enum release_type {
1304 * try to release pci bridge resources that is from leaf bridge, 1303 * try to release pci bridge resources that is from leaf bridge,
1305 * so we can allocate big new one later 1304 * so we can allocate big new one later
1306 */ 1305 */
1307static void __ref pci_bus_release_bridge_resources(struct pci_bus *bus, 1306static void pci_bus_release_bridge_resources(struct pci_bus *bus,
1308 unsigned long type, 1307 unsigned long type,
1309 enum release_type rel_type) 1308 enum release_type rel_type)
1310{ 1309{
1311 struct pci_dev *dev; 1310 struct pci_dev *dev;
1312 bool is_leaf_bridge = true; 1311 bool is_leaf_bridge = true;