Skip to content

Commit

Permalink
cpumask: update local_cpus_show to use new cpumask API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jan 4, 2009
1 parent d3b66bf commit 3be8305
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/pci/pci-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ static ssize_t broken_parity_status_store(struct device *dev,
static ssize_t local_cpus_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
cpumask_t mask;
const struct cpumask *mask;
int len;

mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
len = cpumask_scnprintf(buf, PAGE_SIZE-2, &mask);
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
buf[len++] = '\n';
buf[len] = '\0';
return len;
Expand All @@ -84,11 +84,11 @@ static ssize_t local_cpus_show(struct device *dev,
static ssize_t local_cpulist_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
cpumask_t mask;
const struct cpumask *mask;
int len;

mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
len = cpulist_scnprintf(buf, PAGE_SIZE-2, &mask);
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
buf[len++] = '\n';
buf[len] = '\0';
return len;
Expand Down

0 comments on commit 3be8305

Please sign in to comment.