<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/kfifo.h, branch v2.6.35.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'master' into for-next</title>
<updated>2010-04-23T00:08:44+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2010-04-23T00:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1'/>
<id>6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>include/linux/kfifo.h: fix INIT_KFIFO()</title>
<updated>2010-04-07T15:38:02+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2010-04-06T21:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=530cd330dc3865e3107304a6e84fdc332aa72f7d'/>
<id>530cd330dc3865e3107304a6e84fdc332aa72f7d</id>
<content type='text'>
DECLARE_KFIFO creates a union with a struct kfifo and a buffer array with
size [size + sizeof(struct kfifo)].

INIT_KFIFO then sets the buffer pointer in struct kfifo to point to the
beginning of the buffer array which means that the first call to kfifo_in
will overwrite members of the struct kfifo.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DECLARE_KFIFO creates a union with a struct kfifo and a buffer array with
size [size + sizeof(struct kfifo)].

INIT_KFIFO then sets the buffer pointer in struct kfifo to point to the
beginning of the buffer array which means that the first call to kfifo_in
will overwrite members of the struct kfifo.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: fix KFIFO_INIT in include/linux/kfifo.h</title>
<updated>2010-03-24T23:31:20+00:00</updated>
<author>
<name>David Härdeman</name>
<email>david@hardeman.nu</email>
</author>
<published>2010-03-23T20:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4c87684d32e8f95715d53039dcd2d998dc63d1eb'/>
<id>4c87684d32e8f95715d53039dcd2d998dc63d1eb</id>
<content type='text'>
include/linux/kfifo.h first defines and then undefines __kfifo_initializer
which is used by INIT_KFIFO (which is also a macro, so building a module
which uses INIT_KFIFO will fail).

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
include/linux/kfifo.h first defines and then undefines __kfifo_initializer
which is used by INIT_KFIFO (which is also a macro, so building a module
which uses INIT_KFIFO will fail).

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: fix kerneldoc for kfifo_avail and kfifo_in_locked</title>
<updated>2010-03-18T00:24:38+00:00</updated>
<author>
<name>Viral Mehta</name>
<email>Viral.Mehta@lntinfotech.com</email>
</author>
<published>2010-03-17T14:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8d89807373f95f3f7637e3987710a4500a7a857'/>
<id>a8d89807373f95f3f7637e3987710a4500a7a857</id>
<content type='text'>
Function argument is not having "len" anywhere;
"len" is later used in kfifo_{in|out}.

So here, it would be appropriate to say,
it copies @n bytes and not @len

Signed-off-by: Viral Mehta &lt;viral.mehta@lntinfotech.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function argument is not having "len" anywhere;
"len" is later used in kfifo_{in|out}.

So here, it would be appropriate to say,
it copies @n bytes and not @len

Signed-off-by: Viral Mehta &lt;viral.mehta@lntinfotech.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: Don't use integer as NULL pointer</title>
<updated>2010-02-16T23:11:08+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2010-01-27T14:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a5e0f4c7038168e38d1db6af09d1ac715ee9888'/>
<id>5a5e0f4c7038168e38d1db6af09d1ac715ee9888</id>
<content type='text'>
This patch fixes following sparse warnings:

include/linux/kfifo.h:127:25: warning: Using plain integer as NULL pointer
kernel/kfifo.c:83:21: warning: Using plain integer as NULL pointer

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes following sparse warnings:

include/linux/kfifo.h:127:25: warning: Using plain integer as NULL pointer
kernel/kfifo.c:83:21: warning: Using plain integer as NULL pointer

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: document everywhere that size has to be power of two</title>
<updated>2010-01-16T20:15:38+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5dab600e6a153ceb64832f608069e6c08185411a'/>
<id>5dab600e6a153ceb64832f608069e6c08185411a</id>
<content type='text'>
On my first try using them I missed that the fifos need to be power of
two, resulting in a runtime bug.  Document that requirement everywhere
(and fix one grammar bug)

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On my first try using them I missed that the fifos need to be power of
two, resulting in a runtime bug.  Document that requirement everywhere
(and fix one grammar bug)

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: add kfifo_initialized</title>
<updated>2010-01-16T20:15:38+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d994ffc247f7c4a48b848f10c4c01c9b06411ada'/>
<id>d994ffc247f7c4a48b848f10c4c01c9b06411ada</id>
<content type='text'>
Simple inline that checks if kfifo_init() has been executed on a fifo.

This is useful for walking all per CPU fifos, when some of them might not
have been brought up yet.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simple inline that checks if kfifo_init() has been executed on a fifo.

This is useful for walking all per CPU fifos, when some of them might not
have been brought up yet.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: add kfifo_out_peek</title>
<updated>2010-01-16T20:15:38+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a5b9e2c1063046421ce01dcf5ddd7ec12567f3e1'/>
<id>a5b9e2c1063046421ce01dcf5ddd7ec12567f3e1</id>
<content type='text'>
In some upcoming code it's useful to peek into a FIFO without permanentely
removing data.  This patch implements a new kfifo_out_peek() to do this.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some upcoming code it's useful to peek into a FIFO without permanentely
removing data.  This patch implements a new kfifo_out_peek() to do this.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: sanitize *_user error handling</title>
<updated>2010-01-16T20:15:38+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=64ce1037c5434b1d036cd99ecaee6e00496bc2e9'/>
<id>64ce1037c5434b1d036cd99ecaee6e00496bc2e9</id>
<content type='text'>
Right now for kfifo_*_user it's not easily possible to distingush between
a user copy failing and the FIFO not containing enough data.  The problem
is that both conditions are multiplexed into the same return code.

Avoid this by moving the "copy length" into a separate output parameter
and only return 0/-EFAULT in the main return value.

I didn't fully adapt the weird "record" variants, those seem
to be unused anyways and were rather messy (should they be just removed?)

I would appreciate some double checking if I did all the conversions
correctly.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now for kfifo_*_user it's not easily possible to distingush between
a user copy failing and the FIFO not containing enough data.  The problem
is that both conditions are multiplexed into the same return code.

Avoid this by moving the "copy length" into a separate output parameter
and only return 0/-EFAULT in the main return value.

I didn't fully adapt the weird "record" variants, those seem
to be unused anyways and were rather messy (should they be just removed?)

I would appreciate some double checking if I did all the conversions
correctly.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kfifo: use void * pointers for user buffers</title>
<updated>2010-01-16T20:15:38+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8ecc2951534af10e04ddb5e5ff5c6d217b79f5c2'/>
<id>8ecc2951534af10e04ddb5e5ff5c6d217b79f5c2</id>
<content type='text'>
The pointers to user buffers are currently unsigned char *, which requires
a lot of casting in the caller for any non-char typed buffers.  Use void *
instead.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The pointers to user buffers are currently unsigned char *, which requires
a lot of casting in the caller for any non-char typed buffers.  Use void *
instead.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
