Re: [PATCH 1/1] media: Correctly notify about the failed pipeline validation

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

 



Em Thu, 12 Feb 2015 15:43:11 +0200
Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> escreveu:

> On the place of the source entity name, the sink entity name was printed.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> ---
>  drivers/media/media-entity.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
> index defe4ac..d894481 100644
> --- a/drivers/media/media-entity.c
> +++ b/drivers/media/media-entity.c
> @@ -283,9 +283,9 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
>  			if (ret < 0 && ret != -ENOIOCTLCMD) {
>  				dev_dbg(entity->parent->dev,
>  					"link validation failed for \"%s\":%u -> \"%s\":%u, error %d\n",
> -					entity->name, link->source->index,
> -					link->sink->entity->name,
> -					link->sink->index, ret);
> +					link->source->entity->name,
> +					link->source->index,
> +					entity->name, link->sink->index, ret);

This should likely be reviewed by Laurent, but the above code
seems weird to me...

1) Why should it print the link source, instead of the sink?
I suspect that the code here should take into account the chosen
pad:

                        struct media_pad *pad = link->sink->entity == entity
                                                ? link->sink : link->source;

2) Assuming that your patch is right, why are you printing the
link->sink->index, instead of link->source->index?

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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