Lines Matching full:array
142 int parse_int_array(const char *buf, size_t count, int **array) in parse_int_array() argument
155 *array = ints; in parse_int_array()
165 * @array: Returned pointer to sequence of integers
167 * On success @array is allocated and initialized with a sequence of
171 * Caller takes responsibility for freeing @array when it is no longer
174 int parse_int_array_user(const char __user *from, size_t count, int **array) in parse_int_array_user() argument
183 ret = parse_int_array(buf, count, array); in parse_int_array_user()
752 * kasprintf_strarray - allocate and fill array of sequential strings
761 * Returns array of strings or NULL when memory can't be allocated.
786 * in an array and the array itself
788 * @array: Dynamically allocated array of strings to free.
789 * @n: Number of strings (starting from the beginning of the array) to free.
791 * Passing a non-NULL @array and @n == 0 as well as NULL @array are valid
792 * use-cases. If @array is NULL, the function does nothing.
794 void kfree_strarray(char **array, size_t n) in kfree_strarray() argument
798 if (!array) in kfree_strarray()
802 kfree(array[i]); in kfree_strarray()
803 kfree(array); in kfree_strarray()
808 char **array; member
814 struct strarray *array = res; in devm_kfree_strarray() local
816 kfree_strarray(array->array, array->n); in devm_kfree_strarray()
827 ptr->array = kasprintf_strarray(GFP_KERNEL, prefix, n); in devm_kasprintf_strarray()
828 if (!ptr->array) { in devm_kasprintf_strarray()
836 return ptr->array; in devm_kasprintf_strarray()
908 * match_string - matches given string in an array
909 * @array: array of strings
910 * @n: number of strings in the array or -1 for NULL terminated arrays
913 * This routine will look for a string in an array of strings up to the
914 * n-th element in the array or until the first NULL element.
922 * index of a @string in the @array if matches, or %-EINVAL otherwise.
924 int match_string(const char * const *array, size_t n, const char *string) in match_string() argument
930 item = array[index]; in match_string()
942 * __sysfs_match_string - matches given string in an array
943 * @array: array of strings
944 * @n: number of strings in the array or -1 for NULL terminated arrays
947 * Returns index of @str in the @array or -EINVAL, just like match_string().
950 * This routine will look for a string in an array of strings up to the
951 * n-th element in the array or until the first NULL element.
958 int __sysfs_match_string(const char * const *array, size_t n, const char *str) in __sysfs_match_string() argument
964 item = array[index]; in __sysfs_match_string()