linux/drivers
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
..
accessibility
acpi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2013-11-14 14:42:31 +09:00
amba DMA-API: amba: get rid of separate dma_mask 2013-10-31 14:48:38 +00:00
ata tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
atm atm: firestream: remove duplicate define 2013-10-21 18:46:46 -04:00
auxdisplay framebuffer: Use fb_<level> 2013-10-29 12:53:07 +02:00
base tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
bcma Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-11-13 17:40:34 +09:00
block tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-11-05 15:58:21 -05:00
bus Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
cdrom
char tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
clk DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
clocksource clocksource: sun4i: remove IRQF_DISABLED 2013-10-22 22:36:50 +02:00
connector
cpufreq ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
cpuidle ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
crypto tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
dca
devfreq Merge branch 'pm-devfreq' 2013-11-07 19:24:20 +01:00
dio
dma Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
edac DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
eisa
extcon
firewire tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
firmware Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
fmc
gpio Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
gpu kfifo API type safety 2013-11-15 09:32:23 +09:00
hid tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
hsi hsi: convert bus code to use dev_groups 2013-10-16 18:36:04 -07:00
hv Drivers: hv: vmbus: Fix a bug in channel rescind code 2013-10-19 19:53:46 -07:00
hwmon tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
hwspinlock
i2c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
ide H8/300 has been dead for several years, the kernel for it has 2013-11-12 14:13:14 +09:00
idle ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
iio kfifo API type safety 2013-11-15 09:32:23 +09:00
infiniband PCI changes for the v3.13 merge window: 2013-11-14 14:02:00 +09:00
input tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
iommu iommu/arm-smmu: handle pgtable_page_ctor() fail 2013-11-15 09:32:19 +09:00
ipack ipack: convert bus code to use dev_groups 2013-10-16 18:40:57 -07:00
irqchip Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
isdn isdn: icn: NULL dereference printing error message 2013-11-07 19:11:13 -05:00
leds leds: lp55xx: handle enable pin in driver 2013-10-25 10:13:25 -07:00
lguest
macintosh DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
mailbox
md llists: move llist_reverse_order from raid5 to llist.c 2013-11-15 09:32:22 +09:00
media tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
memory
memstick tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
message drivers/message/i2o/driver.c: add missing destroy_workqueue() on error in i2o_driver_register() 2013-11-13 12:09:26 +09:00
mfd sound updates for 3.13-rc1 2013-11-12 15:29:53 +09:00
misc tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
mmc Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
mtd tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
net kfifo API type safety 2013-11-15 09:32:23 +09:00
nfc
ntb
nubus
of Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
oprofile
parisc
parport tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
pci kfifo API type safety 2013-11-15 09:32:23 +09:00
pcmcia DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
phy usb: patches for v3.13 2013-10-24 16:18:40 +01:00
pinctrl GPIO bulk changes for the v3.13 development cycle 2013-11-12 15:50:46 +09:00
platform tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
pnp ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
power tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
powercap PowerCap: Fix build error with option -Werror=format-security 2013-11-05 02:36:57 +01:00
pps drivers/pps/clients/pps-gpio.c: remove redundant of_match_ptr 2013-11-13 12:09:35 +09:00
ps3
ptp
pwm
rapidio rapidio: convert bus code to use dev_groups 2013-10-16 18:36:03 -07:00
regulator Merge remote-tracking branch 'regulator/topic/tps65910' into regulator-next 2013-10-24 11:11:43 +01:00
remoteproc
reset
rpmsg
rtc tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
s390 Merge branch 'for-3.13/drivers' of git://git.kernel.dk/linux-block 2013-11-14 12:13:05 +09:00
sbus
scsi PCI changes for the v3.13 merge window: 2013-11-14 14:02:00 +09:00
sfi
sh
sn
spi tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
ssb ssb: convert bus code to use dev_groups 2013-10-16 18:36:03 -07:00
staging tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
target target/pscsi: fix return value check 2013-10-25 10:42:09 -07:00
tc
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2013-11-14 14:42:31 +09:00
tty tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
uio drivers/uio/uio_pruss.c: use gen_pool_dma_alloc() to allocate sram memory 2013-11-13 12:09:23 +09:00
usb tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
uwb Driver Core / sysfs patches for 3.13-rc1 2013-11-07 11:42:15 +09:00
vfio
vhost vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter 2013-10-25 11:03:34 -07:00
video tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
virt
virtio virtio: convert bus code to use dev_groups 2013-10-16 18:40:57 -07:00
vlynq
vme
w1 drivers/w1/masters/w1-gpio.c: use dev_get_platdata() 2013-11-15 09:32:21 +09:00
watchdog DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
xen xenbus: convert bus code to use dev_groups 2013-10-16 18:36:03 -07:00
zorro
Kconfig ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
Makefile ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00