Skip to content

Commit 75a24b8

Browse files
Martin KellyJiri Kosina
authored andcommitted
kfifo: fix inaccurate comment
The comment in __kfifo_alloc says we round down, but we actually round up, so correct it. Signed-off-by: Martin Kelly <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 6c59f64 commit 75a24b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kfifo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int __kfifo_alloc(struct __kfifo *fifo, unsigned int size,
3939
size_t esize, gfp_t gfp_mask)
4040
{
4141
/*
42-
* round down to the next power of 2, since our 'let the indices
42+
* round up to the next power of 2, since our 'let the indices
4343
* wrap' technique works only in this case.
4444
*/
4545
size = roundup_pow_of_two(size);

0 commit comments

Comments
 (0)