diff options
-rw-r--r-- | drivers/pci/pci-sysfs.c | 10 | ||||
-rw-r--r-- | drivers/pci/probe.c | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index cc9d65388e62..56a3b397efee 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -44,10 +44,14 @@ pci_config_attr(subsystem_device, "0x%04x\n"); | |||
44 | pci_config_attr(class, "0x%06x\n"); | 44 | pci_config_attr(class, "0x%06x\n"); |
45 | pci_config_attr(irq, "%u\n"); | 45 | pci_config_attr(irq, "%u\n"); |
46 | 46 | ||
47 | static ssize_t local_cpus_show(struct device *dev, struct device_attribute *attr, char *buf) | 47 | static ssize_t local_cpus_show(struct device *dev, |
48 | struct device_attribute *attr, char *buf) | ||
48 | { | 49 | { |
49 | cpumask_t mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); | 50 | cpumask_t mask; |
50 | int len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask); | 51 | int len; |
52 | |||
53 | mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); | ||
54 | len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask); | ||
51 | strcat(buf,"\n"); | 55 | strcat(buf,"\n"); |
52 | return 1+len; | 56 | return 1+len; |
53 | } | 57 | } |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 35caec13023a..26a55d08b506 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -72,11 +72,13 @@ void pci_remove_legacy_files(struct pci_bus *bus) { return; } | |||
72 | /* | 72 | /* |
73 | * PCI Bus Class Devices | 73 | * PCI Bus Class Devices |
74 | */ | 74 | */ |
75 | static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf) | 75 | static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, |
76 | char *buf) | ||
76 | { | 77 | { |
77 | cpumask_t cpumask = pcibus_to_cpumask(to_pci_bus(class_dev)); | ||
78 | int ret; | 78 | int ret; |
79 | cpumask_t cpumask; | ||
79 | 80 | ||
81 | cpumask = pcibus_to_cpumask(to_pci_bus(class_dev)); | ||
80 | ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask); | 82 | ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask); |
81 | if (ret < PAGE_SIZE) | 83 | if (ret < PAGE_SIZE) |
82 | buf[ret++] = '\n'; | 84 | buf[ret++] = '\n'; |