Skip to content
Commit 5a3ea878 authored by Eric Paris's avatar Eric Paris
Browse files

flex_array: flex_array_prealloc takes a number of elements, not an end



Change flex_array_prealloc to take the number of elements for which space
should be allocated instead of the last (inclusive) element. Users
and documentation are updated accordingly.  flex_arrays got introduced before
they had users.  When folks started using it, they ended up needing a
different API than was coded up originally.  This swaps over to the API that
folks apparently need.

Based-on-patch-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Tested-by: default avatarChris Richards <gizmo@giz-works.com>
Acked-by: default avatarDave Hansen <dave@linux.vnet.ibm.com>
Cc: stable@kernel.org [2.6.38+]
parent 562abf62
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment