cregit-Linux how code gets into the kernel

Release 4.7 lib/reciprocal_div.c

Directory: lib
#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

PersonTokensPropCommitsCommitProp
hannes frederic sowahannes frederic sowa7175.53%150.00%
eric dumazeteric dumazet2324.47%150.00%
Total94100.00%2100.00%

EXPORT_SYMBOL(reciprocal_value);

Overall Contributors

PersonTokensPropCommitsCommitProp
hannes frederic sowahannes frederic sowa7566.96%133.33%
eric dumazeteric dumazet3733.04%266.67%
Total112100.00%3100.00%
Directory: lib
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}