X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2Fdiv64.c;h=a111eb8de9cfeefb2bc82011ef580f970091bfcd;hb=d94e5fcbf1420366dcb4102bafe04dbcfc0d0d4b;hp=bb5bd0c0f030a9cf44c57ef07b50fac3e7170ce8;hpb=28a4acb48586dc21d2d14a75a7aab7be78b7c83b;p=firefly-linux-kernel-4.4.55.git diff --git a/lib/div64.c b/lib/div64.c index bb5bd0c0f030..a111eb8de9cf 100644 --- a/lib/div64.c +++ b/lib/div64.c @@ -98,3 +98,13 @@ EXPORT_SYMBOL(div64_u64); #endif #endif /* BITS_PER_LONG == 32 */ + +/* + * Iterative div/mod for use when dividend is not expected to be much + * bigger than divisor. + */ +u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) +{ + return __iter_div_u64_rem(dividend, divisor, remainder); +} +EXPORT_SYMBOL(iter_div_u64_rem);