From: Mike Travis Date: Sun, 4 Jan 2009 13:18:02 +0000 (-0800) Subject: cpumask: update pci_bus_show_cpuaffinity to use new cpumask API X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=588235bb53f2c215f0d4b08fd30b461fedc3338e;p=linux-beck.git cpumask: update pci_bus_show_cpuaffinity 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 Signed-off-by: Ingo Molnar --- diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 5b3f5937ecf5..5a021b82bc04 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -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;