Skip to content

Commit 64f7756

Browse files
committed
crush: remove redundant local variable
Remove extra x1 variable, it's just temporary placeholder that clutters the code unnecessarily. Reflects ceph.git commit 0d19408. Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 74a5293 commit 64f7756

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/ceph/crush/mapper.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static int bucket_straw_choose(struct crush_bucket_straw *bucket,
245245
/* compute 2^44*log2(input+1) */
246246
static __u64 crush_ln(unsigned int xin)
247247
{
248-
unsigned int x = xin, x1;
248+
unsigned int x = xin;
249249
int iexpon, index1, index2;
250250
__u64 RH, LH, LL, xl64, result;
251251

@@ -273,12 +273,11 @@ static __u64 crush_ln(unsigned int xin)
273273
/* RH*x ~ 2^48 * (2^15 + xf), xf<2^8 */
274274
xl64 = (__s64)x * RH;
275275
xl64 >>= 48;
276-
x1 = xl64;
277276

278277
result = iexpon;
279278
result <<= (12 + 32);
280279

281-
index2 = x1 & 0xff;
280+
index2 = xl64 & 0xff;
282281
/* LL ~ 2^48*log2(1.0+index2/2^15) */
283282
LL = __LL_tbl[index2];
284283

0 commit comments

Comments
 (0)