diff options
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r-- | drivers/base/node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index ad43185ec15a..93b3ac65c2d4 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -165,8 +165,11 @@ static ssize_t node_read_distance(struct sys_device * dev, | |||
165 | int len = 0; | 165 | int len = 0; |
166 | int i; | 166 | int i; |
167 | 167 | ||
168 | /* buf currently PAGE_SIZE, need ~4 chars per node */ | 168 | /* |
169 | BUILD_BUG_ON(MAX_NUMNODES*4 > PAGE_SIZE/2); | 169 | * buf is currently PAGE_SIZE in length and each node needs 4 chars |
170 | * at the most (distance + space or newline). | ||
171 | */ | ||
172 | BUILD_BUG_ON(MAX_NUMNODES * 4 > PAGE_SIZE); | ||
170 | 173 | ||
171 | for_each_online_node(i) | 174 | for_each_online_node(i) |
172 | len += sprintf(buf + len, "%s%d", i ? " " : "", node_distance(nid, i)); | 175 | len += sprintf(buf + len, "%s%d", i ? " " : "", node_distance(nid, i)); |