Skip to contentSkip to conversation

kfifo: fix inaccurate comment

PATCH New Martin Kelly 1 participant 1 message Mar 26, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kfifo: fix inaccurate comment

The comment in __kfifo_alloc says we round down, but we actually round up, so correct it.

---
 lib/kfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/kfifo.c +1 -1
index 90ba1eb1df06..b0f757bf7213 100644
@@ -39,7 +39,7 @@ int __kfifo_alloc(struct __kfifo *fifo, unsigned int size,
 		size_t esize, gfp_t gfp_mask)
 {
 	/*
-	 * round down to the next power of 2, since our 'let the indices
+	 * round up to the next power of 2, since our 'let the indices
 	 * wrap' technique works only in this case.
 	 */
 	size = roundup_pow_of_two(size);
Signature · 1 line
2.11.0