Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflict resolution of ice_virtchnl_pf.c based upon work by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -83,15 +83,19 @@ static bool init_stack_slab(void **prealloc)
|
||||
return true;
|
||||
if (stack_slabs[depot_index] == NULL) {
|
||||
stack_slabs[depot_index] = *prealloc;
|
||||
*prealloc = NULL;
|
||||
} else {
|
||||
stack_slabs[depot_index + 1] = *prealloc;
|
||||
/* If this is the last depot slab, do not touch the next one. */
|
||||
if (depot_index + 1 < STACK_ALLOC_MAX_SLABS) {
|
||||
stack_slabs[depot_index + 1] = *prealloc;
|
||||
*prealloc = NULL;
|
||||
}
|
||||
/*
|
||||
* This smp_store_release pairs with smp_load_acquire() from
|
||||
* |next_slab_inited| above and in stack_depot_save().
|
||||
*/
|
||||
smp_store_release(&next_slab_inited, 1);
|
||||
}
|
||||
*prealloc = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
16
lib/string.c
16
lib/string.c
@@ -699,6 +699,14 @@ EXPORT_SYMBOL(sysfs_streq);
|
||||
* @n: number of strings in the array or -1 for NULL terminated arrays
|
||||
* @string: string to match with
|
||||
*
|
||||
* This routine will look for a string in an array of strings up to the
|
||||
* n-th element in the array or until the first NULL element.
|
||||
*
|
||||
* Historically the value of -1 for @n, was used to search in arrays that
|
||||
* are NULL terminated. However, the function does not make a distinction
|
||||
* when finishing the search: either @n elements have been compared OR
|
||||
* the first NULL element was found.
|
||||
*
|
||||
* Return:
|
||||
* index of a @string in the @array if matches, or %-EINVAL otherwise.
|
||||
*/
|
||||
@@ -727,6 +735,14 @@ EXPORT_SYMBOL(match_string);
|
||||
*
|
||||
* Returns index of @str in the @array or -EINVAL, just like match_string().
|
||||
* Uses sysfs_streq instead of strcmp for matching.
|
||||
*
|
||||
* This routine will look for a string in an array of strings up to the
|
||||
* n-th element in the array or until the first NULL element.
|
||||
*
|
||||
* Historically the value of -1 for @n, was used to search in arrays that
|
||||
* are NULL terminated. However, the function does not make a distinction
|
||||
* when finishing the search: either @n elements have been compared OR
|
||||
* the first NULL element was found.
|
||||
*/
|
||||
int __sysfs_match_string(const char * const *array, size_t n, const char *str)
|
||||
{
|
||||
|
Reference in New Issue
Block a user