Commit 64f77566 authored by Ilya Dryomov's avatar Ilya Dryomov

crush: remove redundant local variable

Remove extra x1 variable, it's just temporary placeholder that
clutters the code unnecessarily.

Reflects ceph.git commit 0d19408d91dd747340d70287b4ef9efd89e95c6b.
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 74a52938
...@@ -245,7 +245,7 @@ static int bucket_straw_choose(struct crush_bucket_straw *bucket, ...@@ -245,7 +245,7 @@ static int bucket_straw_choose(struct crush_bucket_straw *bucket,
/* compute 2^44*log2(input+1) */ /* compute 2^44*log2(input+1) */
static __u64 crush_ln(unsigned int xin) static __u64 crush_ln(unsigned int xin)
{ {
unsigned int x = xin, x1; unsigned int x = xin;
int iexpon, index1, index2; int iexpon, index1, index2;
__u64 RH, LH, LL, xl64, result; __u64 RH, LH, LL, xl64, result;
...@@ -273,12 +273,11 @@ static __u64 crush_ln(unsigned int xin) ...@@ -273,12 +273,11 @@ static __u64 crush_ln(unsigned int xin)
/* RH*x ~ 2^48 * (2^15 + xf), xf<2^8 */ /* RH*x ~ 2^48 * (2^15 + xf), xf<2^8 */
xl64 = (__s64)x * RH; xl64 = (__s64)x * RH;
xl64 >>= 48; xl64 >>= 48;
x1 = xl64;
result = iexpon; result = iexpon;
result <<= (12 + 32); result <<= (12 + 32);
index2 = x1 & 0xff; index2 = xl64 & 0xff;
/* LL ~ 2^48*log2(1.0+index2/2^15) */ /* LL ~ 2^48*log2(1.0+index2/2^15) */
LL = __LL_tbl[index2]; LL = __LL_tbl[index2];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment