]> git.baikalelectronics.ru Git - kernel.git/commit
kfifo: fix kfifo_alloc() and kfifo_init()
authorStefani Seibold <stefani@seibold.net>
Thu, 28 Feb 2013 01:05:51 +0000 (17:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Feb 2013 03:10:23 +0000 (19:10 -0800)
commit6ac8db19b1f6d87d8d9e31dee61b6dd5af4ebdf9
tree8ec9dd36b30a4cb53138dec2b07bc4a4c79fa49e
parent1b95d35a7b5777209f9829f17954ed9a9bff8046
kfifo: fix kfifo_alloc() and kfifo_init()

Fix kfifo_alloc() and kfifo_init() to alloc at least the requested number
of elements.  Since the kfifo operates on power of 2 the request size will
be rounded up to the next power of two.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/kfifo.c