Re: [PATCH v3 1/1] v4l2: use __u32 rather than enums in ioctl() structs

From: Arnd Bergmann
Date: Fri May 11 2012 - 05:16:41 EST


On Thursday 10 May 2012, Sakari Ailus wrote:
> 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.

Well, ARM Android was building stuff with short enums for a while, but it
seems that was corrected now, and using __u32 would in this case only
help maintain compatibility when mixing android kernels with regular
user space or vice versa.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/