Commit 4327edf6 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] Subject: PATCH: fix numa caused compile warnings

pcibus_to_cpumask expands into more than just an initialiser so gcc
moans about code before variable declarations.
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b4012a98
...@@ -44,10 +44,14 @@ pci_config_attr(subsystem_device, "0x%04x\n"); ...@@ -44,10 +44,14 @@ pci_config_attr(subsystem_device, "0x%04x\n");
pci_config_attr(class, "0x%06x\n"); pci_config_attr(class, "0x%06x\n");
pci_config_attr(irq, "%u\n"); pci_config_attr(irq, "%u\n");
static ssize_t local_cpus_show(struct device *dev, struct device_attribute *attr, char *buf) static ssize_t local_cpus_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ {
cpumask_t mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); cpumask_t mask;
int len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask); int len;
mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
strcat(buf,"\n"); strcat(buf,"\n");
return 1+len; return 1+len;
} }
......
...@@ -72,11 +72,13 @@ void pci_remove_legacy_files(struct pci_bus *bus) { return; } ...@@ -72,11 +72,13 @@ void pci_remove_legacy_files(struct pci_bus *bus) { return; }
/* /*
* PCI Bus Class Devices * PCI Bus Class Devices
*/ */
static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf) static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev,
char *buf)
{ {
cpumask_t cpumask = pcibus_to_cpumask(to_pci_bus(class_dev));
int ret; int ret;
cpumask_t cpumask;
cpumask = pcibus_to_cpumask(to_pci_bus(class_dev));
ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask); ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask);
if (ret < PAGE_SIZE) if (ret < PAGE_SIZE)
buf[ret++] = '\n'; buf[ret++] = '\n';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment