Re: [Intel-gfx] [PATCH v1 0/2] drm: drop uapi dependencies from include/drm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 24 Jun 2019, Emil Velikov <emil.l.velikov@xxxxxxxxx> wrote:
> On Mon, 24 Jun 2019 at 09:21, Daniel Vetter <daniel@xxxxxxxx> wrote:
>
>> > drm_legacy.h
>> > - needs drm_map_type and drm_map_flags. Seems legit.
>>
>> enum in uapi, sweet (never do this, it's not portable across compilers,
>> #defines all the way).
>
> Don't look too closely then
> $ git grep enum -- include/uapi/drm/ | wc -l
> 96
>
> A handful of those are legacy stuff, yet quite a few are not :-\

Enums are just fine for *values* as long as they're not used as types in
struct members or function parameters or return types, right?

So we do have some we've screwed up, but it's not nearly as bad as the
git grep above would lead you to believe.

The ones in question are used in struct drm_map which is used in
DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP, and DRM_IOCTL_RM_MAP.

BR,
Jani.



-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux