1
0
Fork 0
alistair23-linux/samples
Stefani Seibold 498d319bb5 kfifo API type safety
This patch enhances the type safety for the kfifo API.  It is now safe
to put const data into a non const FIFO and the API will now generate a
compiler warning when reading from the fifo where the destination
address is pointing to a const variable.

As a side effect the kfifo_put() does now expect the value of an element
instead a pointer to the element.  This was suggested Russell King.  It
make the handling of the kfifo_put easier since there is no need to
create a helper variable for getting the address of a pointer or to pass
integers of different sizes.

IMHO the API break is okay, since there are currently only six users of
kfifo_put().

The code is also cleaner by kicking out the "if (0)" expressions.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:23 +09:00
..
hidraw HID: samples/hidraw: add .gitignore file 2013-08-20 12:48:58 +02:00
hw_breakpoint perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
kdb kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
kfifo kfifo API type safety 2013-11-15 09:32:23 +09:00
kobject include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
kprobes tile: support kprobes on tilegx 2013-08-30 11:55:53 -04:00
rpmsg misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
seccomp samples/seccomp: be less stupid about cross compiling 2013-02-05 20:38:49 +11:00
trace_events
uhid HID: uhid: improve uhid example client 2013-09-04 11:35:14 +02:00
Kconfig tracing: Remove tracepoint sample code 2013-01-25 11:22:11 -05:00
Makefile tracing: Remove tracepoint sample code 2013-01-25 11:22:11 -05:00