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>
This commit is contained in:
parent
d3b66bf2e1
commit
3be83050d0
|
@ -70,11 +70,11 @@ static ssize_t broken_parity_status_store(struct device *dev,
|
||||||
static ssize_t local_cpus_show(struct device *dev,
|
static ssize_t local_cpus_show(struct device *dev,
|
||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
cpumask_t mask;
|
const struct cpumask *mask;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
|
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
|
||||||
len = cpumask_scnprintf(buf, PAGE_SIZE-2, &mask);
|
len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
|
||||||
buf[len++] = '\n';
|
buf[len++] = '\n';
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
return len;
|
return len;
|
||||||
|
@ -84,11 +84,11 @@ static ssize_t local_cpus_show(struct device *dev,
|
||||||
static ssize_t local_cpulist_show(struct device *dev,
|
static ssize_t local_cpulist_show(struct device *dev,
|
||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
cpumask_t mask;
|
const struct cpumask *mask;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
|
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
|
||||||
len = cpulist_scnprintf(buf, PAGE_SIZE-2, &mask);
|
len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
|
||||||
buf[len++] = '\n';
|
buf[len++] = '\n';
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
return len;
|
return len;
|
||||||
|
|
Loading…
Reference in New Issue