aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r--drivers/base/node.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index e59861f18ce5..8e3f25bb8f80 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -22,14 +22,15 @@ static struct sysdev_class node_class = {
22static ssize_t node_read_cpumap(struct sys_device * dev, char * buf) 22static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
23{ 23{
24 struct node *node_dev = to_node(dev); 24 struct node *node_dev = to_node(dev);
25 cpumask_t mask = node_to_cpumask(node_dev->sysdev.id); 25 node_to_cpumask_ptr(mask, node_dev->sysdev.id);
26 int len; 26 int len;
27 27
28 /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */ 28 /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
29 BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2); 29 BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2);
30 30
31 len = cpumask_scnprintf(buf, PAGE_SIZE-1, mask); 31 len = cpumask_scnprintf(buf, PAGE_SIZE-2, *mask);
32 len += sprintf(buf + len, "\n"); 32 buf[len++] = '\n';
33 buf[len] = '\0';
33 return len; 34 return len;
34} 35}
35 36