PCI: Make local functions/structs static
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 12 Apr 2013 17:20:03 +0000 (11:20 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 12 Apr 2013 17:26:01 +0000 (11:26 -0600)
This fixes "no previous prototype" warnings found via "make W=1".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/msi.c
drivers/pci/pci.c
drivers/pci/pcie/aer/aer_inject.c
drivers/pci/setup-bus.c

index 00cc78c7aa045e9eb5ff747afce8ac3b66a57e7d..bbff7d5a9b354fdb72e4029b527c57dfe7a323a4 100644 (file)
@@ -484,12 +484,12 @@ static struct msi_attribute mode_attribute =
        __ATTR(mode, S_IRUGO, show_msi_mode, NULL);
 
 
-struct attribute *msi_irq_default_attrs[] = {
+static struct attribute *msi_irq_default_attrs[] = {
        &mode_attribute.attr,
        NULL
 };
 
-void msi_kobj_release(struct kobject *kobj)
+static void msi_kobj_release(struct kobject *kobj)
 {
        struct msi_desc *entry = to_msi_desc(kobj);
 
index b099e0025d2bb55dff5ec8ee922b617f86f68676..f0ef3997ed3b451429c8292f1a2694830659cd2e 100644 (file)
@@ -2619,7 +2619,7 @@ void pci_release_selected_regions(struct pci_dev *pdev, int bars)
                        pci_release_region(pdev, i);
 }
 
-int __pci_request_selected_regions(struct pci_dev *pdev, int bars,
+static int __pci_request_selected_regions(struct pci_dev *pdev, int bars,
                                 const char *res_name, int excl)
 {
        int i;
@@ -3699,7 +3699,7 @@ static DEFINE_SPINLOCK(resource_alignment_lock);
  * RETURNS: Resource alignment if it is specified.
  *          Zero if it is not specified.
  */
-resource_size_t pci_specified_resource_alignment(struct pci_dev *dev)
+static resource_size_t pci_specified_resource_alignment(struct pci_dev *dev)
 {
        int seg, bus, slot, func, align_order, count;
        resource_size_t align = 0;
@@ -3812,7 +3812,7 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
        }
 }
 
-ssize_t pci_set_resource_alignment_param(const char *buf, size_t count)
+static ssize_t pci_set_resource_alignment_param(const char *buf, size_t count)
 {
        if (count > RESOURCE_ALIGNMENT_PARAM_SIZE - 1)
                count = RESOURCE_ALIGNMENT_PARAM_SIZE - 1;
@@ -3823,7 +3823,7 @@ ssize_t pci_set_resource_alignment_param(const char *buf, size_t count)
        return count;
 }
 
-ssize_t pci_get_resource_alignment_param(char *buf, size_t size)
+static ssize_t pci_get_resource_alignment_param(char *buf, size_t size)
 {
        size_t count;
        spin_lock(&resource_alignment_lock);
index 4e24cb8a94aec0ecee6e0e923f5ffee50439e601..2f15475b56bc2030ad026cc5d0a8f6bcfbd2cbc1 100644 (file)
@@ -212,8 +212,8 @@ out:
        return ops->read(bus, devfn, where, size, val);
 }
 
-int pci_write_aer(struct pci_bus *bus, unsigned int devfn, int where, int size,
-                 u32 val)
+static int pci_write_aer(struct pci_bus *bus, unsigned int devfn, int where,
+                        int size, u32 val)
 {
        u32 *sim;
        struct aer_error *err;
index 7e8739e25b9ecddd9b52d19c7bfc486f8c3e7ac7..502a75ea12fbf131fb5284b1567c1e59988bfc39 100644 (file)
@@ -1044,7 +1044,7 @@ handle_done:
        ;
 }
 
-void __ref __pci_bus_size_bridges(struct pci_bus *bus,
+static void __ref __pci_bus_size_bridges(struct pci_bus *bus,
                        struct list_head *realloc_head)
 {
        struct pci_dev *dev;