kfifo: fix kfifo_alloc() to return a signed int value
authorStefani Seibold <stefani@seibold.net>
Wed, 27 Oct 2010 22:34:50 +0000 (15:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 01:03:18 +0000 (18:03 -0700)
commit144ecf310eb52d9df607b9b7eeb096743e232a96
tree2a444a3f618ec070f33b3024f7728db29f5ab7d4
parent12aa4c64174cb0d915cd1c7b763847c0ffa8e92c
kfifo: fix kfifo_alloc() to return a signed int value

Add a new __kfifo_int_must_check_helper() helper function, which is needed
for kfifo_alloc() to return the right signed integer value.

The origin __kfifo_must_check_helper() helper was renamed into
__kfifo_uint_must_check_helper() to show the sign which is expected and
returned.

(And revert the temporary disabling of __kfifo_must_check_helper())

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kfifo.h