diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-24 14:19:24 -0500 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-31 13:32:12 -0500 |
commit | 8f99c85b7ad55faecaab9d29fd7d12f1601c2eea (patch) | |
tree | 01cf23fc88ba81ff1d4c5cd020575fe452b2700d /net | |
parent | bfb16d7d69f0272451ad85a6e50aab3c4262fbc0 (diff) |
crush: reduce scope of some local variables
Reflects ceph.git commit e7d47827f0333c96ad43d257607fb92ed4176550.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/crush/mapper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index 18d2cf66f102..71192b1f8501 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c | |||
@@ -189,7 +189,7 @@ static int terminal(int x) | |||
189 | static int bucket_tree_choose(struct crush_bucket_tree *bucket, | 189 | static int bucket_tree_choose(struct crush_bucket_tree *bucket, |
190 | int x, int r) | 190 | int x, int r) |
191 | { | 191 | { |
192 | int n, l; | 192 | int n; |
193 | __u32 w; | 193 | __u32 w; |
194 | __u64 t; | 194 | __u64 t; |
195 | 195 | ||
@@ -197,6 +197,7 @@ static int bucket_tree_choose(struct crush_bucket_tree *bucket, | |||
197 | n = bucket->num_nodes >> 1; | 197 | n = bucket->num_nodes >> 1; |
198 | 198 | ||
199 | while (!terminal(n)) { | 199 | while (!terminal(n)) { |
200 | int l; | ||
200 | /* pick point in [0, w) */ | 201 | /* pick point in [0, w) */ |
201 | w = bucket->node_weights[n]; | 202 | w = bucket->node_weights[n]; |
202 | t = (__u64)crush_hash32_4(bucket->h.hash, x, n, r, | 203 | t = (__u64)crush_hash32_4(bucket->h.hash, x, n, r, |
@@ -496,7 +497,6 @@ int crush_do_rule(const struct crush_map *map, | |||
496 | __u32 step; | 497 | __u32 step; |
497 | int i, j; | 498 | int i, j; |
498 | int numrep; | 499 | int numrep; |
499 | int firstn; | ||
500 | const int descend_once = 0; | 500 | const int descend_once = 0; |
501 | 501 | ||
502 | if ((__u32)ruleno >= map->max_rules) { | 502 | if ((__u32)ruleno >= map->max_rules) { |
@@ -510,9 +510,9 @@ int crush_do_rule(const struct crush_map *map, | |||
510 | o = b; | 510 | o = b; |
511 | 511 | ||
512 | for (step = 0; step < rule->len; step++) { | 512 | for (step = 0; step < rule->len; step++) { |
513 | int firstn = 0; | ||
513 | struct crush_rule_step *curstep = &rule->steps[step]; | 514 | struct crush_rule_step *curstep = &rule->steps[step]; |
514 | 515 | ||
515 | firstn = 0; | ||
516 | switch (curstep->op) { | 516 | switch (curstep->op) { |
517 | case CRUSH_RULE_TAKE: | 517 | case CRUSH_RULE_TAKE: |
518 | w[0] = curstep->arg1; | 518 | w[0] = curstep->arg1; |