Laurent Pinchart wrote:
> Hi Sakari,

Hello Laurent,

...
>>> +
>>> +struct media_user_pad {
>>> +   __u32 entity;           /* entity ID */
>>> +   __u8 index;             /* pad index */
>>> +   __u32 direction;        /* pad direction */
>>> +};
>>
>> Another small comment, I think you mentioned it yourself some time back
>>
>> :-): how about some reserved fields to these structures?
> 
> Very good point. Reserved fields are needed in media_user_entity and 
> media_user_links at least. For media_user_pad and media_user_link, we could 
> do 
> without reserved fields if we add fields to media_user_links to store the 
> size 
> of those structures.

The structure size is part of the ioctl number defined by the _IOC macro
so I'd go with reserved fields even for these structures. Otherwise
special handling would be required for these ioctls in a few places.

>>> +struct media_user_entity {
>>> +   __u32 id;
>>> +   char name[32];
>>> +   __u32 type;
>>> +   __u32 subtype;
>>> +   __u8 pads;
>>> +   __u32 links;
>>> +
>>> +   union {
>>> +           /* Node specifications */
>>> +           struct {
>>> +                   __u32 major;
>>> +                   __u32 minor;
>>> +           } v4l;
>>> +           struct {
>>> +                   __u32 major;
>>> +                   __u32 minor;
>>> +           } fb;
>>> +           int alsa;
>>> +           int dvb;
>>> +
>>> +           /* Sub-device specifications */
>>> +           /* Nothing needed yet */

This union could have a defined size as well, e.g. u8 blob[64] or something.

Regards,

-- 
Sakari Ailus
sakari.ai...@maxwell.research.nokia.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to