[PATCH RFC v3 10/16] media: rename link source/sink to pad0_source/pad1_sink

Hans Verkuil hverkuil at xs4all.nl
Thu Aug 13 00:58:16 PDT 2015


On 08/12/15 22:14, Mauro Carvalho Chehab wrote:
> Change the internal namespace for links between two pads to
> have the "pad" there.
> 
> We're also numbering it, as a common constructor is to do
> things like:
> 
>  	if (link->port1.type != MEDIA_GRAPH_PAD)
>  		continue;
>  	if (link->pad1_sink->entity == entity)
> 		/* do something */
> 
> by preserving the number, we keep consistency between
> port1 and pad1_sink, and port0 and pad0_source.

I would really leave this patch out. As long as sink and source are consistently
used for pads (and they are), then I see no benefit at all to this change.

Another reason why I don't like this is that pad0_ and pad1_ are actually
confusing since they suggested to me when I first read it that pad0_ referred to
the pad with index 0 and pad1_ referred to the pad with index 1.

That's obviously not the case, but it does mean that the prefix doesn't really
make things clearer.

I would just stick with source and sink.

Regards,

	Hans



More information about the linux-arm-kernel mailing list