Home
last modified time | relevance | path

Searched refs:dec_shift (Results 1 – 2 of 2) sorted by relevance

/linux/include/linux/
H A Dcgroup.h146 int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v);
/linux/kernel/cgroup/
H A Dcgroup.c7074 * @dec_shift: number of decimal digits to shift
7078 * @v with decimal point right shifted @dec_shift times. For example, if
7079 * @input is "12.3456" and @dec_shift is 3, *@v will be set to 12345.
7085 int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v) in cgroup_parse_float() argument
7096 if (flen < dec_shift) in cgroup_parse_float()
7097 frac *= power_of_ten(dec_shift - flen); in cgroup_parse_float()
7099 frac = DIV_ROUND_CLOSEST_ULL(frac, power_of_ten(flen - dec_shift)); in cgroup_parse_float()
7101 *v = whole * power_of_ten(dec_shift) + frac; in cgroup_parse_float()