提交 588235bb 编写于 作者: M Mike Travis 提交者: Ingo Molnar

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: NMike Travis <travis@sgi.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3be83050
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册