/* simple_strtoull - convert a string to an unsigned long long @cp: The start of the string @endp: A pointer to the end of the parsed string will be placed here @base: The number base to use  */
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
/* simple_strtoull - convert a string to an unsigned long long @cp: The start of the string @endp: A pointer to the end of the parsed string will be placed here @base: The number base to use  */
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
{
	unsigned long long result = 0;
	if (!base)
		base = simple_guess_base(cp);
	if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x')
		cp += 2;
	while (isxdigit(*cp)) {
		unsigned int value;
		value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10;
		if (value >= base)
			break;
		result = result * base + value;
		cp++;
	}
	if (endp)
		*endp = (char *)cp;
	return result;
}