Lines Matching +full:value +full:- +full:start

1 // SPDX-License-Identifier: GPL-2.0
24 * memdup - duplicate region of memory
40 * strtobool - convert common user inputs into boolean values
45 * [oO][NnFf] for "on" and "off". Otherwise it will return -EINVAL. Value
51 return -EINVAL; in strtobool()
82 return -EINVAL; in strtobool()
86 * strlcpy - Copy a C-string into a sized buffer
92 * NUL-terminated string that fits in the buffer (unless,
101 #pragma clang diagnostic ignored "-Wignored-attributes"
108 size_t len = (ret >= size) ? size - 1 : ret; in strlcpy()
119 * skip_spaces - Removes leading whitespace from @str.
122 * Returns a pointer to the first non-whitespace character in @str.
132 * strim - Removes leading and trailing whitespace from @s.
135 * Note that the first trailing whitespace is replaced with a %NUL-terminator
136 * in the given string @s. Returns a pointer to the first non-whitespace
148 end = s + size - 1; in strim()
150 end--; in strim()
157 * strreplace - Replace all occurrences of character in string.
172 static void *check_bytes8(const u8 *start, u8 value, unsigned int bytes) in check_bytes8() argument
175 if (*start != value) in check_bytes8()
176 return (void *)start; in check_bytes8()
177 start++; in check_bytes8()
178 bytes--; in check_bytes8()
184 * memchr_inv - Find an unmatching character in an area of memory.
185 * @start: The memory area
192 void *memchr_inv(const void *start, int c, size_t bytes) in memchr_inv() argument
194 u8 value = c; in memchr_inv() local
199 return check_bytes8(start, value, bytes); in memchr_inv()
201 value64 = value; in memchr_inv()
206 prefix = (unsigned long)start % 8; in memchr_inv()
210 prefix = 8 - prefix; in memchr_inv()
211 r = check_bytes8(start, value, prefix); in memchr_inv()
214 start += prefix; in memchr_inv()
215 bytes -= prefix; in memchr_inv()
221 if (*(u64 *)start != value64) in memchr_inv()
222 return check_bytes8(start, value, 8); in memchr_inv()
223 start += 8; in memchr_inv()
224 words--; in memchr_inv()
227 return check_bytes8(start, value, bytes % 8); in memchr_inv()