diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-12 14:02:59 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-17 12:21:17 -0400 |
commit | f39d5b72913e2a9ff00ba5ab145ee05a888b1286 (patch) | |
tree | bf037ca60a3724a7636166093b4b2ede4aeaf464 /include/linux/pci.h | |
parent | 9fc9eea09f518b9bbdc0a14ef668698c913ba614 (diff) |
PCI: Remove "extern" from function declarations
We had an inconsistent mix of using and omitting the "extern" keyword
on function declarations in header files. This removes them all.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 95 |
1 files changed, 47 insertions, 48 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2461033a7987..614512bed7b0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -348,7 +348,7 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | |||
348 | return dev; | 348 | return dev; |
349 | } | 349 | } |
350 | 350 | ||
351 | extern struct pci_dev *alloc_pci_dev(void); | 351 | struct pci_dev *alloc_pci_dev(void); |
352 | 352 | ||
353 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 353 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
354 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 354 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
@@ -504,10 +504,10 @@ struct pci_ops { | |||
504 | * ACPI needs to be able to access PCI config space before we've done a | 504 | * ACPI needs to be able to access PCI config space before we've done a |
505 | * PCI bus scan and created pci_bus structures. | 505 | * PCI bus scan and created pci_bus structures. |
506 | */ | 506 | */ |
507 | extern int raw_pci_read(unsigned int domain, unsigned int bus, | 507 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, |
508 | unsigned int devfn, int reg, int len, u32 *val); | 508 | int reg, int len, u32 *val); |
509 | extern int raw_pci_write(unsigned int domain, unsigned int bus, | 509 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, |
510 | unsigned int devfn, int reg, int len, u32 val); | 510 | int reg, int len, u32 val); |
511 | 511 | ||
512 | struct pci_bus_region { | 512 | struct pci_bus_region { |
513 | resource_size_t start; | 513 | resource_size_t start; |
@@ -658,7 +658,7 @@ struct pci_driver { | |||
658 | /* these external functions are only available when PCI support is enabled */ | 658 | /* these external functions are only available when PCI support is enabled */ |
659 | #ifdef CONFIG_PCI | 659 | #ifdef CONFIG_PCI |
660 | 660 | ||
661 | extern void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); | 661 | void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); |
662 | 662 | ||
663 | enum pcie_bus_config_types { | 663 | enum pcie_bus_config_types { |
664 | PCIE_BUS_TUNE_OFF, | 664 | PCIE_BUS_TUNE_OFF, |
@@ -675,7 +675,7 @@ extern struct bus_type pci_bus_type; | |||
675 | * code, or pci core code. */ | 675 | * code, or pci core code. */ |
676 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 676 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
677 | /* Some device drivers need know if pci is initiated */ | 677 | /* Some device drivers need know if pci is initiated */ |
678 | extern int no_pci_devices(void); | 678 | int no_pci_devices(void); |
679 | 679 | ||
680 | void pcibios_resource_survey_bus(struct pci_bus *bus); | 680 | void pcibios_resource_survey_bus(struct pci_bus *bus); |
681 | void pcibios_fixup_bus(struct pci_bus *); | 681 | void pcibios_fixup_bus(struct pci_bus *); |
@@ -699,7 +699,7 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | |||
699 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 699 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
700 | struct pci_bus_region *region); | 700 | struct pci_bus_region *region); |
701 | void pcibios_scan_specific_bus(int busn); | 701 | void pcibios_scan_specific_bus(int busn); |
702 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 702 | struct pci_bus *pci_find_bus(int domain, int busnr); |
703 | void pci_bus_add_devices(const struct pci_bus *bus); | 703 | void pci_bus_add_devices(const struct pci_bus *bus); |
704 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 704 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
705 | struct pci_ops *ops, void *sysdata); | 705 | struct pci_ops *ops, void *sysdata); |
@@ -732,14 +732,14 @@ struct resource *pci_find_parent_resource(const struct pci_dev *dev, | |||
732 | u8 pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin); | 732 | u8 pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin); |
733 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); | 733 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); |
734 | u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); | 734 | u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); |
735 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | 735 | struct pci_dev *pci_dev_get(struct pci_dev *dev); |
736 | extern void pci_dev_put(struct pci_dev *dev); | 736 | void pci_dev_put(struct pci_dev *dev); |
737 | extern void pci_remove_bus(struct pci_bus *b); | 737 | void pci_remove_bus(struct pci_bus *b); |
738 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); | 738 | void pci_stop_and_remove_bus_device(struct pci_dev *dev); |
739 | void pci_stop_root_bus(struct pci_bus *bus); | 739 | void pci_stop_root_bus(struct pci_bus *bus); |
740 | void pci_remove_root_bus(struct pci_bus *bus); | 740 | void pci_remove_root_bus(struct pci_bus *bus); |
741 | void pci_setup_cardbus(struct pci_bus *bus); | 741 | void pci_setup_cardbus(struct pci_bus *bus); |
742 | extern void pci_sort_breadthfirst(void); | 742 | void pci_sort_breadthfirst(void); |
743 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) | 743 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) |
744 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) | 744 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) |
745 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) | 745 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) |
@@ -1141,18 +1141,17 @@ static inline int pci_msi_enabled(void) | |||
1141 | return 0; | 1141 | return 0; |
1142 | } | 1142 | } |
1143 | #else | 1143 | #else |
1144 | extern int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); | 1144 | int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); |
1145 | extern int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); | 1145 | int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); |
1146 | extern void pci_msi_shutdown(struct pci_dev *dev); | 1146 | void pci_msi_shutdown(struct pci_dev *dev); |
1147 | extern void pci_disable_msi(struct pci_dev *dev); | 1147 | void pci_disable_msi(struct pci_dev *dev); |
1148 | extern int pci_msix_table_size(struct pci_dev *dev); | 1148 | int pci_msix_table_size(struct pci_dev *dev); |
1149 | extern int pci_enable_msix(struct pci_dev *dev, | 1149 | int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec); |
1150 | struct msix_entry *entries, int nvec); | 1150 | void pci_msix_shutdown(struct pci_dev *dev); |
1151 | extern void pci_msix_shutdown(struct pci_dev *dev); | 1151 | void pci_disable_msix(struct pci_dev *dev); |
1152 | extern void pci_disable_msix(struct pci_dev *dev); | 1152 | void msi_remove_pci_irq_vectors(struct pci_dev *dev); |
1153 | extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); | 1153 | void pci_restore_msi_state(struct pci_dev *dev); |
1154 | extern void pci_restore_msi_state(struct pci_dev *dev); | 1154 | int pci_msi_enabled(void); |
1155 | extern int pci_msi_enabled(void); | ||
1156 | #endif | 1155 | #endif |
1157 | 1156 | ||
1158 | #ifdef CONFIG_PCIEPORTBUS | 1157 | #ifdef CONFIG_PCIEPORTBUS |
@@ -1167,8 +1166,8 @@ extern bool pcie_ports_auto; | |||
1167 | static inline int pcie_aspm_enabled(void) { return 0; } | 1166 | static inline int pcie_aspm_enabled(void) { return 0; } |
1168 | static inline bool pcie_aspm_support_enabled(void) { return false; } | 1167 | static inline bool pcie_aspm_support_enabled(void) { return false; } |
1169 | #else | 1168 | #else |
1170 | extern int pcie_aspm_enabled(void); | 1169 | int pcie_aspm_enabled(void); |
1171 | extern bool pcie_aspm_support_enabled(void); | 1170 | bool pcie_aspm_support_enabled(void); |
1172 | #endif | 1171 | #endif |
1173 | 1172 | ||
1174 | #ifdef CONFIG_PCIEAER | 1173 | #ifdef CONFIG_PCIEAER |
@@ -1186,8 +1185,8 @@ static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | |||
1186 | } | 1185 | } |
1187 | static inline void pcie_ecrc_get_policy(char *str) {}; | 1186 | static inline void pcie_ecrc_get_policy(char *str) {}; |
1188 | #else | 1187 | #else |
1189 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | 1188 | void pcie_set_ecrc_checking(struct pci_dev *dev); |
1190 | extern void pcie_ecrc_get_policy(char *str); | 1189 | void pcie_ecrc_get_policy(char *str); |
1191 | #endif | 1190 | #endif |
1192 | 1191 | ||
1193 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 1192 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
@@ -1198,9 +1197,9 @@ int ht_create_irq(struct pci_dev *dev, int idx); | |||
1198 | void ht_destroy_irq(unsigned int irq); | 1197 | void ht_destroy_irq(unsigned int irq); |
1199 | #endif /* CONFIG_HT_IRQ */ | 1198 | #endif /* CONFIG_HT_IRQ */ |
1200 | 1199 | ||
1201 | extern void pci_cfg_access_lock(struct pci_dev *dev); | 1200 | void pci_cfg_access_lock(struct pci_dev *dev); |
1202 | extern bool pci_cfg_access_trylock(struct pci_dev *dev); | 1201 | bool pci_cfg_access_trylock(struct pci_dev *dev); |
1203 | extern void pci_cfg_access_unlock(struct pci_dev *dev); | 1202 | void pci_cfg_access_unlock(struct pci_dev *dev); |
1204 | 1203 | ||
1205 | /* | 1204 | /* |
1206 | * PCI domain support. Sometimes called PCI segment (eg by ACPI), | 1205 | * PCI domain support. Sometimes called PCI segment (eg by ACPI), |
@@ -1225,7 +1224,7 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
1225 | /* some architectures require additional setup to direct VGA traffic */ | 1224 | /* some architectures require additional setup to direct VGA traffic */ |
1226 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, | 1225 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, |
1227 | unsigned int command_bits, u32 flags); | 1226 | unsigned int command_bits, u32 flags); |
1228 | extern void pci_register_set_vga_state(arch_set_vga_state_t func); | 1227 | void pci_register_set_vga_state(arch_set_vga_state_t func); |
1229 | 1228 | ||
1230 | #else /* CONFIG_PCI is not enabled */ | 1229 | #else /* CONFIG_PCI is not enabled */ |
1231 | 1230 | ||
@@ -1627,8 +1626,8 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, | |||
1627 | int pcibios_add_device(struct pci_dev *dev); | 1626 | int pcibios_add_device(struct pci_dev *dev); |
1628 | 1627 | ||
1629 | #ifdef CONFIG_PCI_MMCONFIG | 1628 | #ifdef CONFIG_PCI_MMCONFIG |
1630 | extern void __init pci_mmcfg_early_init(void); | 1629 | void __init pci_mmcfg_early_init(void); |
1631 | extern void __init pci_mmcfg_late_init(void); | 1630 | void __init pci_mmcfg_late_init(void); |
1632 | #else | 1631 | #else |
1633 | static inline void pci_mmcfg_early_init(void) { } | 1632 | static inline void pci_mmcfg_early_init(void) { } |
1634 | static inline void pci_mmcfg_late_init(void) { } | 1633 | static inline void pci_mmcfg_late_init(void) { } |
@@ -1639,12 +1638,12 @@ int pci_ext_cfg_avail(void); | |||
1639 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1638 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1640 | 1639 | ||
1641 | #ifdef CONFIG_PCI_IOV | 1640 | #ifdef CONFIG_PCI_IOV |
1642 | extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | 1641 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); |
1643 | extern void pci_disable_sriov(struct pci_dev *dev); | 1642 | void pci_disable_sriov(struct pci_dev *dev); |
1644 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); | 1643 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); |
1645 | extern int pci_num_vf(struct pci_dev *dev); | 1644 | int pci_num_vf(struct pci_dev *dev); |
1646 | extern int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); | 1645 | int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); |
1647 | extern int pci_sriov_get_totalvfs(struct pci_dev *dev); | 1646 | int pci_sriov_get_totalvfs(struct pci_dev *dev); |
1648 | #else | 1647 | #else |
1649 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) | 1648 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) |
1650 | { | 1649 | { |
@@ -1672,8 +1671,8 @@ static inline int pci_sriov_get_totalvfs(struct pci_dev *dev) | |||
1672 | #endif | 1671 | #endif |
1673 | 1672 | ||
1674 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | 1673 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) |
1675 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | 1674 | void pci_hp_create_module_link(struct pci_slot *pci_slot); |
1676 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | 1675 | void pci_hp_remove_module_link(struct pci_slot *pci_slot); |
1677 | #endif | 1676 | #endif |
1678 | 1677 | ||
1679 | /** | 1678 | /** |
@@ -1817,13 +1816,13 @@ int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, | |||
1817 | /* PCI <-> OF binding helpers */ | 1816 | /* PCI <-> OF binding helpers */ |
1818 | #ifdef CONFIG_OF | 1817 | #ifdef CONFIG_OF |
1819 | struct device_node; | 1818 | struct device_node; |
1820 | extern void pci_set_of_node(struct pci_dev *dev); | 1819 | void pci_set_of_node(struct pci_dev *dev); |
1821 | extern void pci_release_of_node(struct pci_dev *dev); | 1820 | void pci_release_of_node(struct pci_dev *dev); |
1822 | extern void pci_set_bus_of_node(struct pci_bus *bus); | 1821 | void pci_set_bus_of_node(struct pci_bus *bus); |
1823 | extern void pci_release_bus_of_node(struct pci_bus *bus); | 1822 | void pci_release_bus_of_node(struct pci_bus *bus); |
1824 | 1823 | ||
1825 | /* Arch may override this (weak) */ | 1824 | /* Arch may override this (weak) */ |
1826 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); | 1825 | struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); |
1827 | 1826 | ||
1828 | static inline struct device_node * | 1827 | static inline struct device_node * |
1829 | pci_device_to_OF_node(const struct pci_dev *pdev) | 1828 | pci_device_to_OF_node(const struct pci_dev *pdev) |