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 * remove_spaces - Removes whitespaces from @s
170 * strreplace - Replace all occurrences of character in string.
185 static void *check_bytes8(const u8 *start, u8 value, unsigned int bytes) in check_bytes8() argument
188 if (*start != value) in check_bytes8()
189 return (void *)start; in check_bytes8()
190 start++; in check_bytes8()
191 bytes--; in check_bytes8()
197 * memchr_inv - Find an unmatching character in an area of memory.
198 * @start: The memory area
205 void *memchr_inv(const void *start, int c, size_t bytes) in memchr_inv() argument
207 u8 value = c; in memchr_inv() local
212 return check_bytes8(start, value, bytes); in memchr_inv()
214 value64 = value; in memchr_inv()
219 prefix = (unsigned long)start % 8; in memchr_inv()
223 prefix = 8 - prefix; in memchr_inv()
224 r = check_bytes8(start, value, prefix); in memchr_inv()
227 start += prefix; in memchr_inv()
228 bytes -= prefix; in memchr_inv()
234 if (*(u64 *)start != value64) in memchr_inv()
235 return check_bytes8(start, value, 8); in memchr_inv()
236 start += 8; in memchr_inv()
237 words--; in memchr_inv()
240 return check_bytes8(start, value, bytes % 8); in memchr_inv()