cpumask: update local_cpus_show to use new cpumask API

Impact: use new cpumask API to reduce stack usage

Replace the local cpumask_t variable with a pointer to the
const cpumask that needs to be printed.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Mike Travis and committed by
Ingo Molnar
3be83050 d3b66bf2

+6 -6
+6 -6
drivers/pci/pci-sysfs.c
··· 70 static ssize_t local_cpus_show(struct device *dev, 71 struct device_attribute *attr, char *buf) 72 { 73 - cpumask_t mask; 74 int len; 75 76 - mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); 77 - len = cpumask_scnprintf(buf, PAGE_SIZE-2, &mask); 78 buf[len++] = '\n'; 79 buf[len] = '\0'; 80 return len; ··· 84 static ssize_t local_cpulist_show(struct device *dev, 85 struct device_attribute *attr, char *buf) 86 { 87 - cpumask_t mask; 88 int len; 89 90 - mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); 91 - len = cpulist_scnprintf(buf, PAGE_SIZE-2, &mask); 92 buf[len++] = '\n'; 93 buf[len] = '\0'; 94 return len;
··· 70 static ssize_t local_cpus_show(struct device *dev, 71 struct device_attribute *attr, char *buf) 72 { 73 + const struct cpumask *mask; 74 int len; 75 76 + mask = cpumask_of_pcibus(to_pci_dev(dev)->bus); 77 + len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask); 78 buf[len++] = '\n'; 79 buf[len] = '\0'; 80 return len; ··· 84 static ssize_t local_cpulist_show(struct device *dev, 85 struct device_attribute *attr, char *buf) 86 { 87 + const struct cpumask *mask; 88 int len; 89 90 + mask = cpumask_of_pcibus(to_pci_dev(dev)->bus); 91 + len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask); 92 buf[len++] = '\n'; 93 buf[len] = '\0'; 94 return len;