projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b35de43
)
kfifo: add kfifo_skip() testcase
author
Andrea Righi
<
[email protected]
>
Thu, 19 Aug 2010 21:13:28 +0000
(14:13 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 20 Aug 2010 16:34:54 +0000
(09:34 -0700)
Add a testcase for kfifo_skip() to the byte stream fifo example.
Signed-off-by: Andrea Righi <
[email protected]
>
Cc: Greg KH <
[email protected]
>
Acked-by: Stefani Seibold <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
samples/kfifo/bytestream-example.c
patch
|
blob
|
history
diff --git
a/samples/kfifo/bytestream-example.c
b/samples/kfifo/bytestream-example.c
index 642eef3f633624413dccda3ab85b1eb6e2bcc578..2e3a7a8128a26667b8cb65728bf8554b18726a85 100644
(file)
--- 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++)
;