[PATCH 3/9] drm: Make sure every ioctl structure has a typedef

Daniel Vetter daniel at ffwll.ch
Sun Sep 8 13:04:02 PDT 2013

On Sun, Sep 8, 2013 at 9:36 PM, Damien Lespiau <damien.lespiau at intel.com> wrote:
> On Sun, Sep 08, 2013 at 01:58:29PM +0200, Daniel Vetter wrote:
>> On Fri, Sep 06, 2013 at 07:57:19PM +0100, Damien Lespiau wrote:
>> > Just for consistency.
>> >
>> > Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
>> Afaik kernel coding style is to echew typdefs for normal structures as
>> much as possible. The only exception is for truly opaque types used in
>> abstractions, like dma_addr_t or pid_t.
>> All the typedefs we still have here go back to the old days of a drm core
>> shared between *bsd and linux. Since that's long gone they imo should all
>> die, but certainly we shouldn't add new ones.
> I figured that since we where talking about user space API, the kernel
> rules wouldn't apply there and we could have some consistency, but I
> certainly can just drop those patches.

I've thought typedefs are even frowned upon in the ioctl abi -
magically changing sized types cause pain since they need 32bit compat
wrappers. And otherwise I haven't really seen them much for structures
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

More information about the dri-devel mailing list