aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kfifo.c
Commit message (Collapse)AuthorAge
* kfifo: kfifo_copy_{to,from}_user: fix copied bytes calculationLars-Peter Clausen2013-11-14
| | | | | | | | | | 'copied' and 'len' are in bytes, while 'ret' is in elements, so we need to multiply 'ret' with the size of one element to get the correct result. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Stefani Seibold <stefani@seibold.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kfifo: fix kfifo_alloc() and kfifo_init()Stefani Seibold2013-02-27
| | | | | | | | | | 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>
* kfifo: move kfifo.c from kernel/ to lib/Stefani Seibold2013-02-27
Move kfifo.c from kernel/ to lib/ 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>