kfifo: fix inaccurate comment
authorMartin Kelly <mkelly@xevo.com>
Mon, 26 Mar 2018 18:18:23 +0000 (11:18 -0700)
committerJiri Kosina <jkosina@suse.cz>
Tue, 27 Mar 2018 09:15:42 +0000 (11:15 +0200)
The comment in __kfifo_alloc says we round down, but we actually round
up, so correct it.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
lib/kfifo.c

index 90ba1eb1df06e5283a2dad9132b53346f5106812..b0f757bf72136856aa6ae54d93692111bcc1b0c9 100644 (file)
@@ -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);