Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298894
b: refs/heads/master
c: c04c1b9
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Apr 4, 2012
1 parent 574dfaa commit 88a2f9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: e466de05194b666114713b753e2f4be1d4200140
refs/heads/master: c04c1b9ee8f30c7a3a25e20e406247003f634ebe
8 changes: 7 additions & 1 deletion trunk/drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ static int rbtree_show(struct seq_file *s, void *ignored)
unsigned int base, top;
int nodes = 0;
int registers = 0;
int average;

mutex_lock(&map->lock);

Expand All @@ -152,8 +153,13 @@ static int rbtree_show(struct seq_file *s, void *ignored)
registers += top - base + 1;
}

if (nodes)
average = registers / nodes;
else
average = 0;

seq_printf(s, "%d nodes, %d registers, average %d registers\n",
nodes, registers, registers / nodes);
nodes, registers, average);

mutex_unlock(&map->lock);

Expand Down

0 comments on commit 88a2f9e

Please sign in to comment.