Lines Matching refs:base
112 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) in simple_strtoull() argument
116 if (!base) in simple_strtoull()
117 base = simple_guess_base(cp); in simple_strtoull()
119 if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x') in simple_strtoull()
126 if (value >= base) in simple_strtoull()
128 result = result * base + value; in simple_strtoull()
137 long simple_strtol(const char *cp, char **endp, unsigned int base) in simple_strtol() argument
140 return -simple_strtoull(cp + 1, endp, base); in simple_strtol()
142 return simple_strtoull(cp, endp, base); in simple_strtol()
224 static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) in _parse_integer_fixup_radix() argument
226 if (*base == 0) { in _parse_integer_fixup_radix()
229 *base = 16; in _parse_integer_fixup_radix()
231 *base = 8; in _parse_integer_fixup_radix()
233 *base = 10; in _parse_integer_fixup_radix()
235 if (*base == 16 && s[0] == '0' && _tolower(s[1]) == 'x') in _parse_integer_fixup_radix()
249 unsigned int base, in _parse_integer() argument
269 if (val >= base) in _parse_integer()
276 if (res > __div_u64(ULLONG_MAX - val, base)) in _parse_integer()
279 res = res * base + val; in _parse_integer()
287 static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res) in _kstrtoull() argument
292 s = _parse_integer_fixup_radix(s, &base); in _kstrtoull()
293 rv = _parse_integer(s, base, &_res); in _kstrtoull()
323 int kstrtoull(const char *s, unsigned int base, unsigned long long *res) in kstrtoull() argument
327 return _kstrtoull(s, base, res); in kstrtoull()
330 static int _kstrtoul(const char *s, unsigned int base, unsigned long *res) in _kstrtoul() argument
335 rv = kstrtoull(s, base, &tmp); in _kstrtoul()
359 int boot_kstrtoul(const char *s, unsigned int base, unsigned long *res) in boot_kstrtoul() argument
367 return kstrtoull(s, base, (unsigned long long *)res); in boot_kstrtoul()
369 return _kstrtoul(s, base, res); in boot_kstrtoul()