OSDN Git Service

PCI: Remove unnecessary __ref annotations
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 14 Apr 2014 22:11:40 +0000 (16:11 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 29 Apr 2014 23:36:44 +0000 (17:36 -0600)
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>
drivers/pci/hotplug-pci.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/cpci_hotplug_pci.c
drivers/pci/hotplug/shpchp_pci.c
drivers/pci/pci.h
drivers/pci/probe.c
drivers/pci/setup-bus.c

index 6258dc2..c68366c 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/export.h>
 #include "pci.h"
 
-int __ref pci_hp_add_bridge(struct pci_dev *dev)
+int pci_hp_add_bridge(struct pci_dev *dev)
 {
        struct pci_bus *parent = dev->bus;
        int pass, busnr, start = parent->busn_res.start;
index 0238a02..bb945e3 100644 (file)
@@ -500,7 +500,7 @@ static int acpiphp_rescan_slot(struct acpiphp_slot *slot)
  * This function should be called per *physical slot*,
  * not per each slot object in ACPI namespace.
  */
-static void __ref enable_slot(struct acpiphp_slot *slot)
+static void enable_slot(struct acpiphp_slot *slot)
 {
        struct pci_dev *dev;
        struct pci_bus *bus = slot->bus;
index 8c14648..b238a1a 100644 (file)
@@ -250,7 +250,7 @@ int cpci_led_off(struct slot* slot)
  * Device configuration functions
  */
 
-int __ref cpci_configure_slot(struct slot *slot)
+int cpci_configure_slot(struct slot *slot)
 {
        struct pci_dev *dev;
        struct pci_bus *parent;
index 2bf69fe..18209eb 100644 (file)
@@ -34,7 +34,7 @@
 #include "../pci.h"
 #include "shpchp.h"
 
-int __ref shpchp_configure_device(struct slot *p_slot)
+int shpchp_configure_device(struct slot *p_slot)
 {
        struct pci_dev *dev;
        struct controller *ctrl = p_slot->ctrl;
index 6bd0822..fe233a3 100644 (file)
@@ -201,11 +201,11 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
                    struct resource *res, unsigned int reg);
 int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type);
 void pci_configure_ari(struct pci_dev *dev);
-void __ref __pci_bus_size_bridges(struct pci_bus *bus,
+void __pci_bus_size_bridges(struct pci_bus *bus,
                        struct list_head *realloc_head);
-void __ref __pci_bus_assign_resources(const struct pci_bus *bus,
-                                     struct list_head *realloc_head,
-                                     struct list_head *fail_head);
+void __pci_bus_assign_resources(const struct pci_bus *bus,
+                               struct list_head *realloc_head,
+                               struct list_head *fail_head);
 
 /**
  * pci_ari_enabled - query ARI forwarding status
index ef09f5f..fe89a98 100644 (file)
@@ -719,7 +719,7 @@ add_dev:
        return child;
 }
 
-struct pci_bus *__ref pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr)
+struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr)
 {
        struct pci_bus *child;
 
@@ -1369,7 +1369,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
        WARN_ON(ret < 0);
 }
 
-struct pci_dev *__ref pci_scan_single_device(struct pci_bus *bus, int devfn)
+struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn)
 {
        struct pci_dev *dev;
 
@@ -1958,7 +1958,7 @@ EXPORT_SYMBOL(pci_scan_bus);
  *
  * Returns the max number of subordinate bus discovered.
  */
-unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
+unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
 {
        unsigned int max;
        struct pci_bus *bus = bridge->subordinate;
@@ -1981,7 +1981,7 @@ unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge)
  *
  * Returns the max number of subordinate bus discovered.
  */
-unsigned int __ref pci_rescan_bus(struct pci_bus *bus)
+unsigned int pci_rescan_bus(struct pci_bus *bus)
 {
        unsigned int max;
 
index 138bdd6..d219d44 100644 (file)
@@ -1113,8 +1113,7 @@ handle_done:
        ;
 }
 
-void __ref __pci_bus_size_bridges(struct pci_bus *bus,
-                       struct list_head *realloc_head)
+void __pci_bus_size_bridges(struct pci_bus *bus, struct list_head *realloc_head)
 {
        struct pci_dev *dev;
        unsigned long mask, prefmask;
@@ -1178,15 +1177,15 @@ void __ref __pci_bus_size_bridges(struct pci_bus *bus,
        }
 }
 
-void __ref pci_bus_size_bridges(struct pci_bus *bus)
+void pci_bus_size_bridges(struct pci_bus *bus)
 {
        __pci_bus_size_bridges(bus, NULL);
 }
 EXPORT_SYMBOL(pci_bus_size_bridges);
 
-void __ref __pci_bus_assign_resources(const struct pci_bus *bus,
-                                     struct list_head *realloc_head,
-                                     struct list_head *fail_head)
+void __pci_bus_assign_resources(const struct pci_bus *bus,
+                               struct list_head *realloc_head,
+                               struct list_head *fail_head)
 {
        struct pci_bus *b;
        struct pci_dev *dev;
@@ -1218,15 +1217,15 @@ void __ref __pci_bus_assign_resources(const struct pci_bus *bus,
        }
 }
 
-void __ref pci_bus_assign_resources(const struct pci_bus *bus)
+void pci_bus_assign_resources(const struct pci_bus *bus)
 {
        __pci_bus_assign_resources(bus, NULL, NULL);
 }
 EXPORT_SYMBOL(pci_bus_assign_resources);
 
-static void __ref __pci_bridge_assign_resources(const struct pci_dev *bridge,
-                                        struct list_head *add_head,
-                                        struct list_head *fail_head)
+static void __pci_bridge_assign_resources(const struct pci_dev *bridge,
+                                         struct list_head *add_head,
+                                         struct list_head *fail_head)
 {
        struct pci_bus *b;
 
@@ -1304,9 +1303,9 @@ enum release_type {
  * try to release pci bridge resources that is from leaf bridge,
  * so we can allocate big new one later
  */
-static void __ref pci_bus_release_bridge_resources(struct pci_bus *bus,
-                                                  unsigned long type,
-                                                  enum release_type rel_type)
+static void pci_bus_release_bridge_resources(struct pci_bus *bus,
+                                            unsigned long type,
+                                            enum release_type rel_type)
 {
        struct pci_dev *dev;
        bool is_leaf_bridge = true;