linux/Documentation
Sakari Ailus 6016af82ea [media] v4l2: use __u32 rather than enums in ioctl() structs
V4L2 uses the enum type in IOCTL arguments in IOCTLs that were defined until
the use of enum was considered less than ideal. Recently Rémi Denis-Courmont
brought up the issue by proposing a patch to convert the enums to unsigned:

<URL:http://www.spinics.net/lists/linux-media/msg46167.html>

This sparked a long discussion where another solution to the issue was
proposed: two sets of IOCTL structures, one with __u32 and the other with
enums, and conversion code between the two:

<URL:http://www.spinics.net/lists/linux-media/msg47168.html>

Both approaches implement a complete solution that resolves the problem. The
first one is simple but requires assuming enums and __u32 are the same in
size (so we won't break the ABI) while the second one is more complex and
less clean but does not require making that assumption.

The issue boils down to whether enums are fundamentally different from __u32
or not, and can the former be substituted by the latter. During the
discussion it was concluded that the __u32 has the same size as enums on all
archs Linux is supported: it has not been shown that replacing those enums
in IOCTL arguments would break neither source or binary compatibility. If no
such reason is found, just replacing the enums with __u32s is the way to go.

This is what this patch does. This patch is slightly different from Remi's
first RFC (link above): it uses __u32 instead of unsigned and also changes
the arguments of VIDIOC_G_PRIORITY and VIDIOC_S_PRIORITY.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 08:09:02 -03:00
..
ABI Merge branch 'for-3.4/drivers' of git://git.kernel.dk/linux-block 2012-04-13 18:45:13 -07:00
accounting
acpi Update documentation for parameter *notrigger* in einj.txt 2012-03-30 03:30:19 -04:00
aoe Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
arm Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
auxdisplay
backlight backlight: new backlight driver for LP855x devices 2012-03-23 16:58:33 -07:00
blackfin
block
blockdev Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
cdrom
cgroups memcg: fix up documentation on global LRU 2012-04-12 13:12:11 -07:00
connector
console
cpu-freq
cpuidle cpuidle: add a sysfs entry to disable specific C state for debug purpose. 2012-03-30 01:52:58 -04:00
cris
crypto
development-process
device-mapper dm: add verity target 2012-03-28 18:43:38 +01:00
devicetree ARM: SoC fixes for 3.4-rc2 2012-04-05 22:13:39 -07:00
DocBook [media] v4l2: use __u32 rather than enums in ioctl() structs 2012-05-14 08:09:02 -03:00
driver-model Merge remote-tracking branches 'regulator/topic/devm' and 'regulator/topic/stub' into regulator-next 2012-03-18 21:38:28 +00:00
dvb [media] lmedm04 RS2000 Firmware details 2012-03-19 14:55:55 -03:00
early-userspace
EDID drm: allow loading an EDID as firmware to override broken monitor 2012-03-20 10:09:28 +00:00
fault-injection
fb Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
filesystems typo fix in Documentation/filesystems/vfs.txt 2012-04-09 01:39:24 -04:00
firmware_class
frv
hid
hwmon hwmon: (k10temp) Add support for AMD Trinity CPUs 2012-04-01 10:25:56 -07:00
i2c Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
i2o Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
ia64
ide Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
infiniband
input Documentation: input.txt: clarify mousedev 'cat' command syntax 2012-03-30 16:03:15 -07:00
ioctl Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi 2012-04-02 09:50:40 -07:00
isdn Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
ja_JP
kbuild Documentation: mention scripts/diffconfig tool 2012-03-30 16:03:15 -07:00
kdump
ko_KR driver-core: documentation: fix up Greg's email address 2012-02-15 14:48:01 -08:00
laptops Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
leds drivers/leds/leds-lp5521.c: support led pattern data 2012-03-23 16:58:34 -07:00
m68k
make
mips
misc-devices
mmc mmc: core: Fixup delayed work clock gating patch 2012-01-11 23:58:43 -05:00
mn10300
mtd
namespaces
netlabel
networking doc, net: Update ndo_start_xmit return type and values 2012-04-06 02:43:13 -04:00
nfc
parisc
PCI
pcmcia
power PM / Freezer / Docs: Document the beauty of freeze/thaw semantics 2012-02-09 23:55:49 +01:00
powerpc Documentation/powerpc/mpc52xx.txt: Checkpatch cleanup 2012-03-18 23:59:34 +01:00
pps
prctl
pti
ptp
rapidio
RCU rcu: Call out dangers of expedited RCU primitives 2012-02-21 09:06:08 -08:00
s390 Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
scheduler sched: Remove sched_switch 2012-01-27 13:28:53 +01:00
scsi SCSI updates on 20120331 2012-03-31 13:31:23 -07:00
security Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-03-21 13:25:04 -07:00
serial Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
sh
sound ALSA: hda/realtek - Add a few ALC882 model strings back 2012-04-11 14:10:57 +02:00
sparc
spi spi: create a message queueing infrastructure 2012-03-07 19:19:48 -07:00
sysctl Documentation: add missing tainted bits to Documentation/sysctl/kernel.txt 2012-02-06 16:29:19 -08:00
target Documentation: Fix typo in tcm_mod_builder.py 2012-02-10 09:52:18 +01:00
telephony
thermal thermal: Rename generate_netlink_event 2012-01-23 03:15:25 -05:00
timers
trace Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
usb USB documentation: explain lifetime rules for unlinking URBs 2012-04-06 13:54:00 -07:00
vDSO
video4linux [media] v4l2-event: Add v4l2_subscribed_event_ops 2012-05-07 16:28:35 -03:00
virtual Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
vm mm: move hugepage test examples to tools/testing/selftests/vm 2012-03-28 17:14:37 -07:00
w1
watchdog watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core 2012-03-27 20:15:37 +02:00
wimax
x86
zh_CN Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-03-20 21:04:47 -07:00
.gitignore
00-INDEX crc32: move long comment about crc32 fundamentals to Documentation/ 2012-03-23 16:58:37 -07:00
applying-patches.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
BUG-HUNTING
bus-virt-phys-mapping.txt
cachetlb.txt
Changes
circular-buffers.txt
clk.txt Documentation: common clk API 2012-03-16 20:35:01 +00:00
coccinelle.txt coccinelle.txt: update documentation to include M= option 2012-01-14 22:25:56 +01:00
CodingStyle Documentation: CodingStyle: add inline assembly guidelines 2012-03-30 16:03:15 -07:00
cpu-hotplug.txt documentation: remove references to cpu_*_map. 2012-03-29 15:38:31 +10:30
cpu-load.txt
cputopology.txt
crc32.txt crc32: move long comment about crc32 fundamentals to Documentation/ 2012-03-23 16:58:37 -07:00
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt vhost-net: add module alias (v2.1) 2012-01-13 10:12:23 -08:00
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt common: DMA-mapping: add NON-CONSISTENT attribute 2012-03-28 16:36:44 +02:00
dma-buf-sharing.txt dma-buf: document fd flags and O_CLOEXEC requirement 2012-03-26 11:33:22 +05:30
DMA-ISA-LPC.txt
dmaengine.txt Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
dontdiff Documentation: remove 'mach' from dontdiff file 2012-03-30 16:03:15 -07:00
dynamic-debug-howto.txt dynamic_debug: process multiple debug-queries on a line 2012-01-24 12:50:36 -08:00
edac.txt EDAC: Correct scrub rate API 2012-03-19 12:03:58 +01:00
eisa.txt
email-clients.txt
feature-removal-schedule.txt Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-04-12 15:16:26 -07:00
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt Documentation/gpio.txt: Explain expected pinctrl interaction 2012-03-12 11:27:07 -06:00
highuid.txt
HOWTO
hw_random.txt
hwspinlock.txt
init.txt
initrd.txt
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt irq_domain: add documentation and MAINTAINERS entry. 2012-02-14 14:06:47 -07:00
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt Merge branch 'for-3.4' of git://linux-nfs.org/~bfields/linux 2012-03-29 14:53:25 -07:00
kmemcheck.txt
kmemleak.txt
kobject.txt driver-core: documentation: fix up Greg's email address 2012-02-15 14:48:01 -08:00
kprobes.txt
kref.txt
ldm.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
lockup-watchdogs.txt watchdog: Update documentation 2012-02-11 15:11:28 +01:00
logo.gif
logo.txt
magic-number.txt drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
Makefile mm: move hugepage test examples to tools/testing/selftests/vm 2012-03-28 17:14:37 -07:00
ManagementStyle
mca.txt
md.txt
media-framework.txt
memory-barriers.txt
memory-hotplug.txt
memory.txt
mono.txt Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
mutex-design.txt
nommu-mmap.txt
numastat.txt Doc: Update numastat.txt 2012-02-28 16:05:06 +01:00
oops-tracing.txt
padata.txt
parport-lowlevel.txt
parport.txt Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
pi-futex.txt
pinctrl.txt pinctrl: enhance mapping table to support pin config operations 2012-03-05 11:25:11 +01:00
pnp.txt
preempt-locking.txt
printk-formats.txt
prio_tree.txt
ramoops.txt
rbtree.txt
remoteproc.txt remoteproc: remove the single rpmsg vdev limitation 2012-03-06 19:14:12 +02:00
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt rpmsg: add virtio-based remote processor messaging bus 2012-02-08 22:53:58 +02:00
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt stable: update documentation to ask for kernel version 2012-01-24 10:50:22 -08:00
static-keys.txt static keys: Add docs better explaining the whole 'struct static_key' mechanism 2012-02-24 09:12:19 +01:00
SubmitChecklist
SubmittingDrivers
SubmittingPatches
svga.txt
sysfs-rules.txt
sysrq.txt Documentation: sysrq: Crutcher Dunnavant is unavailable 2012-03-30 16:03:15 -07:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
VGA-softcursor.txt
vgaarbiter.txt misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
video-output.txt
volatile-considered-harmful.txt
workqueue.txt
xz.txt
zorro.txt