X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=samples%2Fkfifo%2Fbytestream-example.c;fp=samples%2Fkfifo%2Fbytestream-example.c;h=2e3a7a8128a26667b8cb65728bf8554b18726a85;hb=5ddf83912c8b49a24ab0841f6d77f33781dcf10f;hp=642eef3f633624413dccda3ab85b1eb6e2bcc578;hpb=b35de43b31040828f83046f40fd34ba33146409d;p=net-next-2.6.git diff --git a/samples/kfifo/bytestream-example.c b/samples/kfifo/bytestream-example.c index 642eef3f633..2e3a7a8128a 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++) ;