From: Stefani Seibold <stefani@seibold.net>
To: Andrea Righi <arighi@develer.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Andi Kleen <ak@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] kfifo: implement missing __kfifo_skip_r()
Date: Thu, 12 Aug 2010 22:45:59 +0200 [thread overview]
Message-ID: <1281645959.10603.13.camel@wall-e.seibold.net> (raw)
In-Reply-To: <1281627158-9461-1-git-send-email-arighi@develer.com>
kfifo_skip() is currently broken, due to the missing of the internal
helper function. Add it.
Signed-off-by: Andrea Righi <arighi@develer.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
---
include/linux/kfifo.h | 2 ++
kernel/kfifo.c | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 311f875..4aa95f2 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -836,6 +836,8 @@ extern void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize);
extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize);
+extern void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize);
+
extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo,
void *buf, unsigned int len, size_t recsize);
diff --git a/kernel/kfifo.c b/kernel/kfifo.c
index 02192dd..06d6eee 100644
--- a/kernel/kfifo.c
+++ b/kernel/kfifo.c
@@ -504,6 +504,15 @@ unsigned int __kfifo_out_r(struct __kfifo *fifo, void *buf,
}
EXPORT_SYMBOL(__kfifo_out_r);
+void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize)
+{
+ unsigned int n;
+
+ n = __kfifo_peek_n(fifo, recsize);
+ fifo->out += n + recsize;
+}
+EXPORT_SYMBOL(__kfifo_skip_r);
+
int __kfifo_from_user_r(struct __kfifo *fifo, const void __user *from,
unsigned long len, unsigned int *copied, size_t recsize)
{
prev parent reply other threads:[~2010-08-12 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 15:32 Andrea Righi
2010-08-12 15:32 ` [PATCH 2/2] kfifo: add kfifo_skip() testcase Andrea Righi
2010-08-12 20:46 ` Stefani Seibold
2010-08-12 21:22 ` Andrew Morton
2010-08-12 22:28 ` Andrea Righi
2010-08-12 20:45 ` Stefani Seibold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281645959.10603.13.camel@wall-e.seibold.net \
--to=stefani@seibold.net \
--cc=ak@linux.intel.com \
--cc=arighi@develer.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome