From: Ilya Dryomov Date: Mon, 23 Dec 2013 16:12:56 +0000 (+0200) Subject: crush/mapper: unsigned -> unsigned int X-Git-Tag: v0.75~46^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6e36794fc9b0801f1c14ac824399843035a800c2;p=ceph.git crush/mapper: unsigned -> unsigned int Kernel implementation is located in net/, and use of "unsigned int" is preferred to bare "unsigned" in net tree (as proven by several net/ cleanups). Follow this guideline to shrink the diff. Signed-off-by: Ilya Dryomov --- diff --git a/src/crush/mapper.c b/src/crush/mapper.c index 54359b6f9eee..8ca3f7c169cd 100644 --- a/src/crush/mapper.c +++ b/src/crush/mapper.c @@ -69,8 +69,8 @@ int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size static int bucket_perm_choose(struct crush_bucket *bucket, int x, int r) { - unsigned pr = r % bucket->size; - unsigned i, s; + unsigned int pr = r % bucket->size; + unsigned int i, s; /* start a new permutation if @x has changed */ if (bucket->perm_x != (__u32)x || bucket->perm_n == 0) { @@ -101,13 +101,13 @@ static int bucket_perm_choose(struct crush_bucket *bucket, for (i = 0; i < bucket->perm_n; i++) dprintk(" perm_choose have %d: %d\n", i, bucket->perm[i]); while (bucket->perm_n <= pr) { - unsigned p = bucket->perm_n; + unsigned int p = bucket->perm_n; /* no point in swapping the final entry */ if (p < bucket->size - 1) { i = crush_hash32_3(bucket->hash, x, bucket->id, p) % (bucket->size - p); if (i) { - unsigned t = bucket->perm[p + i]; + unsigned int t = bucket->perm[p + i]; bucket->perm[p + i] = bucket->perm[p]; bucket->perm[p] = t; } @@ -300,10 +300,10 @@ static int crush_choose_firstn(const struct crush_map *map, const __u32 *weight, int weight_max, int x, int numrep, int type, int *out, int outpos, - unsigned tries, - unsigned recurse_tries, - unsigned local_tries, - unsigned local_fallback_tries, + unsigned int tries, + unsigned int recurse_tries, + unsigned int local_tries, + unsigned int local_fallback_tries, int recurse_to_leaf, int *out2) { @@ -465,7 +465,8 @@ static void crush_choose_indep(const struct crush_map *map, const __u32 *weight, int weight_max, int x, int left, int numrep, int type, int *out, int outpos, - unsigned tries, unsigned recurse_tries, + unsigned int tries, + unsigned int recurse_tries, int recurse_to_leaf, int *out2, int parent_r)