1 #include <linux/kernel.h>
5 * simple_strtoull - convert a string to an unsigned long long
6 * @cp: The start of the string
7 * @endp: A pointer to the end of the parsed string will be placed here
8 * @base: The number base to use
10 * This function is obsolete. Please use kstrtoull instead.
12 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
14 unsigned long long result;
17 cp = _parse_integer_fixup_radix(cp, &base);
18 rv = _parse_integer(cp, base, &result);
20 cp += (rv & ~KSTRTOX_OVERFLOW);
27 EXPORT_SYMBOL(simple_strtoull);
30 * simple_strtoul - convert a string to an unsigned long
31 * @cp: The start of the string
32 * @endp: A pointer to the end of the parsed string will be placed here
33 * @base: The number base to use
35 * This function is obsolete. Please use kstrtoul instead.
37 unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base)
39 return simple_strtoull(cp, endp, base);
41 EXPORT_SYMBOL(simple_strtoul);
44 * simple_strtol - convert a string to a signed long
45 * @cp: The start of the string
46 * @endp: A pointer to the end of the parsed string will be placed here
47 * @base: The number base to use
49 * This function is obsolete. Please use kstrtol instead.
51 long simple_strtol(const char *cp, char **endp, unsigned int base)
54 return -simple_strtoul(cp + 1, endp, base);
56 return simple_strtoul(cp, endp, base);
58 EXPORT_SYMBOL(simple_strtol);
61 * simple_strtoll - convert a string to a signed long long
62 * @cp: The start of the string
63 * @endp: A pointer to the end of the parsed string will be placed here
64 * @base: The number base to use
66 * This function is obsolete. Please use kstrtoll instead.
68 long long simple_strtoll(const char *cp, char **endp, unsigned int base)
71 return -simple_strtoull(cp + 1, endp, base);
73 return simple_strtoull(cp, endp, base);
75 EXPORT_SYMBOL(simple_strtoll);