OSDN Git Service

MIPS: VDSO: Prevent use of smp_processor_id()
[android-x86/kernel.git] / lib / div64.c
index 7f34525..c1c1a4c 100644 (file)
@@ -102,7 +102,7 @@ u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder)
                quot = div_u64_rem(dividend, divisor, &rem32);
                *remainder = rem32;
        } else {
-               int n = 1 + fls(high);
+               int n = fls(high);
                quot = div_u64(dividend >> n, divisor >> n);
 
                if (quot != 0)
@@ -140,7 +140,7 @@ u64 div64_u64(u64 dividend, u64 divisor)
        if (high == 0) {
                quot = div_u64(dividend, divisor);
        } else {
-               int n = 1 + fls(high);
+               int n = fls(high);
                quot = div_u64(dividend >> n, divisor >> n);
 
                if (quot != 0)