diff options
author | Sven Wegener <sven.wegener@stealer.net> | 2008-09-20 12:41:16 +0000 |
---|---|---|
committer | Sven Wegener <sven.wegener@stealer.net> | 2009-02-08 23:35:53 +0000 |
commit | e1d860cef2ecc7da1b44afa7697b799c763f4003 (patch) | |
tree | eb7f5d7f7c7224682c5bc8feec94a7b0397c5e7d | |
parent | 3a4bf73cf1d438ffd6466135c7ad75323f1c5132 (diff) |
pci: sparse fixes
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
-rw-r--r-- | arch/ia64/pci/pci.c | 3 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug.h | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/intel-iommu.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 2 | ||||
-rw-r--r-- | drivers/pci/probe.c | 5 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 2 |
9 files changed, 13 insertions, 12 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 61f1af5c23c1..ce66bca6d130 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -715,9 +715,6 @@ int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size) return ret; } -/* It's defined in drivers/pci/pci.c */ -extern u8 pci_cache_line_size; - /** * set_pci_cacheline_size - determine cacheline size for PCI devices * diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 82d22fc601ae..10c82fc523cf 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -407,8 +407,6 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) return bus; } -extern u8 pci_cache_line_size; - int __init pcibios_init(void) { struct cpuinfo_x86 *c = &boot_cpu_data; diff --git a/drivers/pci/hotplug/cpci_hotplug.h b/drivers/pci/hotplug/cpci_hotplug.h index 9fff878cf026..6a93fcb58f73 100644 --- a/drivers/pci/hotplug/cpci_hotplug.h +++ b/drivers/pci/hotplug/cpci_hotplug.h @@ -99,4 +99,6 @@ extern int cpci_led_off(struct slot * slot); extern int cpci_configure_slot(struct slot *slot); extern int cpci_unconfigure_slot(struct slot *slot); +extern int cpci_debug; + #endif /* _CPCI_HOTPLUG_H */ diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index 829c327cfb5e..e4f035b0c637 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c @@ -33,8 +33,6 @@ #define MY_NAME "cpci_hotplug" -extern int cpci_debug; - #define dbg(format, arg...) \ do { \ if (cpci_debug) \ diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 3dfecb20d5e7..aac131063265 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -246,7 +246,7 @@ struct device_domain_info { static void flush_unmaps_timeout(unsigned long data); -DEFINE_TIMER(unmap_timer, flush_unmaps_timeout, 0, 0); +static DEFINE_TIMER(unmap_timer, flush_unmaps_timeout, 0, 0); #define HIGH_WATER_MARK 250 struct deferred_flush_tables { @@ -2139,7 +2139,7 @@ static inline u64 aligned_size(u64 host_addr, size_t size) return PAGE_ALIGN(addr); } -struct iova * +static struct iova * iommu_alloc_iova(struct dmar_domain *domain, size_t size, u64 end) { struct iova *piova; diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 93eac1423585..4f73a1603fd4 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -799,7 +799,7 @@ static int pci_pm_restore(struct device *dev) #endif /* !CONFIG_HIBERNATION */ -struct dev_pm_ops pci_dev_pm_ops = { +static struct dev_pm_ops pci_dev_pm_ops = { .prepare = pci_pm_prepare, .complete = pci_pm_complete, .suspend = pci_pm_suspend, diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 55ec44a27e89..9d7df004675d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -77,7 +77,7 @@ static ssize_t inline pci_bus_show_cpulistaffinity(struct device *dev, } DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpumaskaffinity, NULL); -DEVICE_ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL); +static DEVICE_ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL); /* * PCI Bus Class @@ -1154,6 +1154,9 @@ struct pci_bus * pci_create_bus(struct device *parent, error = device_create_file(&b->dev, &dev_attr_cpuaffinity); if (error) goto dev_create_file_err; + error = device_create_file(&b->dev, &dev_attr_cpulistaffinity); + if (error) + goto dev_create_file_err; /* Create legacy_io and legacy_mem files for this bus */ pci_create_legacy_files(b); diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index baad093aafe3..21295a1e7771 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -22,7 +22,8 @@ #include <linux/delay.h> #include <linux/acpi.h> #include <linux/kallsyms.h> -#include <linux/dmi.h> +#include <asm/dma.h> + #include "pci.h" int isa_dma_bridge_buggy; diff --git a/include/linux/pci.h b/include/linux/pci.h index 7bd624bfdcfd..461c020afe61 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1194,5 +1194,7 @@ int pci_ext_cfg_avail(struct pci_dev *dev); void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); +extern u8 pci_cache_line_size; + #endif /* __KERNEL__ */ #endif /* LINUX_PCI_H */ |