aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/crush
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-04-15 01:58:06 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-15 12:44:40 -0400
commit95c961747284a6b83a5e2d81240e214b0fa3464d (patch)
treec7be86a00db3605a48a03109fafcbe31039ca2e0 /net/ceph/crush
parent5e73ea1a31c3612aa6dfe44f864ca5b7b6a4cff9 (diff)
net: cleanup unsigned to unsigned int
Use of "unsigned int" is preferred to bare "unsigned" in net tree. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ceph/crush')
-rw-r--r--net/ceph/crush/mapper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c
index b79747c4b645..854ac53f56cd 100644
--- a/net/ceph/crush/mapper.c
+++ b/net/ceph/crush/mapper.c
@@ -68,8 +68,8 @@ int crush_find_rule(struct crush_map *map, int ruleset, int type, int size)
68static int bucket_perm_choose(struct crush_bucket *bucket, 68static int bucket_perm_choose(struct crush_bucket *bucket,
69 int x, int r) 69 int x, int r)
70{ 70{
71 unsigned pr = r % bucket->size; 71 unsigned int pr = r % bucket->size;
72 unsigned i, s; 72 unsigned int i, s;
73 73
74 /* start a new permutation if @x has changed */ 74 /* start a new permutation if @x has changed */
75 if (bucket->perm_x != x || bucket->perm_n == 0) { 75 if (bucket->perm_x != x || bucket->perm_n == 0) {
@@ -100,13 +100,13 @@ static int bucket_perm_choose(struct crush_bucket *bucket,
100 for (i = 0; i < bucket->perm_n; i++) 100 for (i = 0; i < bucket->perm_n; i++)
101 dprintk(" perm_choose have %d: %d\n", i, bucket->perm[i]); 101 dprintk(" perm_choose have %d: %d\n", i, bucket->perm[i]);
102 while (bucket->perm_n <= pr) { 102 while (bucket->perm_n <= pr) {
103 unsigned p = bucket->perm_n; 103 unsigned int p = bucket->perm_n;
104 /* no point in swapping the final entry */ 104 /* no point in swapping the final entry */
105 if (p < bucket->size - 1) { 105 if (p < bucket->size - 1) {
106 i = crush_hash32_3(bucket->hash, x, bucket->id, p) % 106 i = crush_hash32_3(bucket->hash, x, bucket->id, p) %
107 (bucket->size - p); 107 (bucket->size - p);
108 if (i) { 108 if (i) {
109 unsigned t = bucket->perm[p + i]; 109 unsigned int t = bucket->perm[p + i];
110 bucket->perm[p + i] = bucket->perm[p]; 110 bucket->perm[p + i] = bucket->perm[p];
111 bucket->perm[p] = t; 111 bucket->perm[p] = t;
112 } 112 }