From: Andrea Righi Date: Thu, 19 Aug 2010 21:13:28 +0000 (-0700) Subject: kfifo: add kfifo_skip() testcase X-Git-Tag: upstream/snapshot3+hdmi~13190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ddf83912c8b49a24ab0841f6d77f33781dcf10f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git kfifo: add kfifo_skip() testcase Add a testcase for kfifo_skip() to the byte stream fifo example. Signed-off-by: Andrea Righi Cc: Greg KH Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/samples/kfifo/bytestream-example.c b/samples/kfifo/bytestream-example.c index 642eef3..2e3a7a8 100644 --- a/samples/kfifo/bytestream-example.c +++ b/samples/kfifo/bytestream-example.c @@ -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++) ;