BACKPORT: Documentation/llvm: add documentation on building w/ Clang/LLVM
[GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git] / lib / div64.c
index 7f345259c32f1e6c96eb5787b3d489f436a03898..c1c1a4c36dd5fe484aa7e8c70b8ea381fbc8ee05 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)