]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kfifo: fix kfifo_alloc() and kfifo_init()
authorStefani Seibold <stefani@seibold.net>
Wed, 20 Feb 2013 02:16:59 +0000 (13:16 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:54:13 +0000 (16:54 +1100)
commit7eb4ccde404ea4105754db5e332adb1826ca60fc
tree6496fe33e6d582f27e6e09df76383de3c0e3554b
parent7d1bb288451ccc8a094f13900056f43b7cafbc28
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>
lib/kfifo.c