Skip to content

Commit

Permalink
cpumask: update pci_bus_show_cpuaffinity 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 3be8305 commit 588235b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ static ssize_t pci_bus_show_cpuaffinity(struct device *dev,
char *buf)
{
int ret;
cpumask_t cpumask;
const struct cpumask *cpumask;

cpumask = pcibus_to_cpumask(to_pci_bus(dev));
cpumask = cpumask_of_pcibus(to_pci_bus(dev));
ret = type?
cpulist_scnprintf(buf, PAGE_SIZE-2, &cpumask) :
cpumask_scnprintf(buf, PAGE_SIZE-2, &cpumask);
cpulist_scnprintf(buf, PAGE_SIZE-2, cpumask) :
cpumask_scnprintf(buf, PAGE_SIZE-2, cpumask);
buf[ret++] = '\n';
buf[ret] = '\0';
return ret;
Expand Down

0 comments on commit 588235b

Please sign in to comment.