Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188805
b: refs/heads/master
c: 12ee3c0
h: refs/heads/master
i:
  188803: 431a6de
v: v3
  • Loading branch information
David Rientjes authored and Greg Kroah-Hartman committed Mar 19, 2010
1 parent ed8e4e9 commit 378fd23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0eae0ed3b7d4182a6b4dd03540a738518ea3163
refs/heads/master: 12ee3c0a0ac42bed0939420468fd35f5cdceae4f
7 changes: 5 additions & 2 deletions trunk/drivers/base/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ static ssize_t node_read_distance(struct sys_device * dev,
int len = 0;
int i;

/* buf currently PAGE_SIZE, need ~4 chars per node */
BUILD_BUG_ON(MAX_NUMNODES*4 > PAGE_SIZE/2);
/*
* buf is currently PAGE_SIZE in length and each node needs 4 chars
* at the most (distance + space or newline).
*/
BUILD_BUG_ON(MAX_NUMNODES * 4 > PAGE_SIZE);

for_each_online_node(i)
len += sprintf(buf + len, "%s%d", i ? " " : "", node_distance(nid, i));
Expand Down

0 comments on commit 378fd23

Please sign in to comment.