[Intel-gfx] [RFC PATCH 3/3] libdrm: user mode helper for ipvr drm driver
Daniel Vetter
daniel at ffwll.ch
Wed Oct 29 09:14:52 CET 2014
On Tue, Oct 28, 2014 at 04:56:03PM +0000, Daniel Stone wrote:
> Hi,
>
> On 17 October 2014 01:36, Jiang, Fei <fei.jiang at intel.com> wrote:
>
> > Thanks for Emil's suggestion. You are right, we need make sure structure
> > size aligned on 8 bytes, which is important for 32bit-64bit compatible case.
>
>
> While you're at it, please don't use enum as a type inside ioctls, since
> the size can vary by compiler. Please use a uint32_t or whatever instead,
> assigning enum values to that.
Quick correction: You must use __u32 and friends, since using the standard
C typesdef might collide with some program which defines them a different
way. The double underscore ones are explicit ok per the C standard as
private types for the system library. So they're the only ones we can use
in userspace headers.
I've thought checkpatch would bitch about this if you get it wrong, now
that we have the uapi split ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list