Commit 5ddf8391 authored by Andrea Righi's avatar Andrea Righi Committed by Linus Torvalds

kfifo: add kfifo_skip() testcase

Add a testcase for kfifo_skip() to the byte stream fifo example.
Signed-off-by: default avatarAndrea Righi <arighi@develer.com>
Cc: Greg KH <greg@kroah.com>
Acked-by: default avatarStefani Seibold <stefani@seibold.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b35de43b
......@@ -73,6 +73,10 @@ static int __init testfunc(void)
ret = kfifo_in(&test, buf, ret);
printk(KERN_INFO "ret: %d\n", ret);
/* skip first element of the fifo */
printk(KERN_INFO "skip 1st element\n");
kfifo_skip(&test);
/* put values into the fifo until is full */
for (i = 20; kfifo_put(&test, &i); i++)
;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment