kfifo: document everywhere that size has to be power of two
On my first try using them I missed that the fifos need to be power of two, resulting in a runtime bug. Document that requirement everywhere (and fix one grammar bug) Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Stefani Seibold <stefani@seibold.net> Cc: Roland Dreier <rdreier@cisco.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Andy Walls <awalls@radix.net> Cc: Vikram Dhillon <dhillonv10@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
d994ffc247
commit
5dab600e6a
@@ -41,7 +41,7 @@ static void _kfifo_init(struct kfifo *fifo, void *buffer,
|
||||
* kfifo_init - initialize a FIFO using a preallocated buffer
|
||||
* @fifo: the fifo to assign the buffer
|
||||
* @buffer: the preallocated buffer to be used.
|
||||
* @size: the size of the internal buffer, this have to be a power of 2.
|
||||
* @size: the size of the internal buffer, this has to be a power of 2.
|
||||
*
|
||||
*/
|
||||
void kfifo_init(struct kfifo *fifo, void *buffer, unsigned int size)
|
||||
|
Reference in New Issue
Block a user