Re: [PATCH v15 05/19] media: subdev: Add [GS]_ROUTING subdev ioctls and operations

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

 



Hi Sakari,

On 10/4/22 00:01, Sakari Ailus wrote:
> Hi Hans,
> 
> On Mon, Oct 03, 2022 at 04:26:32PM +0200, Hans Verkuil wrote:
>>> +#define V4L2_SUBDEV_ROUTE_FL_SOURCE		(1U << 1)
>>
>> Can we rename this to _FL_INTERNAL_SOURCE? Just 'SOURCE' is very confusing
>> IMHO. The name 'INTERNAL_SOURCE' makes it clear that it is generated internally,
>> and so does not come from an external sink-side endpoint.
>>
>> I also think that the documentation for this flag in patch 04/19 is very vague,
>> I'll comment on that patch as well.
> 
> Having descriptive names is important but I think "SOURCE" as such is fine
> for the purpose. Adding "INTERNAL_" adds 9 characters to what is already a
> very long name, making the flag very clumsy to use in code. That's why I
> would prefer to keep it as-is.
> 

_FL_SOURCE is meaningless (at least to me): there are so many 'source' and 'sink'
references, that just plain 'SOURCE' doesn't help me understand what the flag
means. I did consider INT_SOURCE, but I thought 'INT' is too close to 'interrupt'.
I'm OK with that, though.

Another alternative would be _FL_NO_SINK: that clearly conveys that 1) there is
no sink, and implies that 2) the source is internally generated.

Or perhaps: _FL_SOURCE_ONLY?

But let's avoid V4L2_SUBDEV_ROUTE_FL_SOURCE: to me that just says that the route
has a source, but that's true for all routes. There is nothing in the flag name
to indicate that the route has *only* a source and no sink.

Regards,

	Hans



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux