Release 4.7 lib/reciprocal_div.c
#include <linux/kernel.h>
#include <asm/div64.h>
#include <linux/reciprocal_div.h>
#include <linux/export.h>
/*
* For a description of the algorithm please have a look at
* include/linux/reciprocal_div.h
*/
struct reciprocal_value reciprocal_value(u32 d)
{
struct reciprocal_value R;
u64 m;
int l;
l = fls(d - 1);
m = ((1ULL << 32) * ((1ULL << l) - d));
do_div(m, d);
++m;
R.m = (u32)m;
R.sh1 = min(l, 1);
R.sh2 = max(l - 1, 0);
return R;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hannes frederic sowa | hannes frederic sowa | 71 | 75.53% | 1 | 50.00% |
eric dumazet | eric dumazet | 23 | 24.47% | 1 | 50.00% |
| Total | 94 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(reciprocal_value);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
hannes frederic sowa | hannes frederic sowa | 75 | 66.96% | 1 | 33.33% |
eric dumazet | eric dumazet | 37 | 33.04% | 2 | 66.67% |
| Total | 112 | 100.00% | 3 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.