diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2005-09-10 03:25:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:06:21 -0400 |
commit | 4327edf6b8a7ac7dce144313947995538842d8fd (patch) | |
tree | e814f19d6f2ec8887ad590bfd67cd89d3d9f1002 /drivers/pci/pci-sysfs.c | |
parent | b4012a9895b3e28e3bff3aa534d58c7827af6d4f (diff) |
[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: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index cc9d65388e6..56a3b397efe 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 | } |