Hi,
On 04/10/2022 13:05, Sakari Ailus wrote:
Hi Hans,
On Tue, Oct 04, 2022 at 10:43:55AM +0200, Hans Verkuil wrote:
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?
This appears as the best compromise IMO. NO_SINK is shorter but conveying
the meaning through negation is what I don't like too much.
SOURCE_ONLY sounds fine to me.
Tomi