All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH 1/1] media: Correctly notify about the failed pipeline validation
Date: Wed, 8 Apr 2015 08:23:42 -0300	[thread overview]
Message-ID: <20150408082342.1ff93eef@recife.lan> (raw)
In-Reply-To: <1423748591-19402-1-git-send-email-sakari.ailus@linux.intel.com>

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

> On the place of the source entity name, the sink entity name was printed.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  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

  reply	other threads:[~2015-04-08 11:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 13:43 [PATCH 1/1] media: Correctly notify about the failed pipeline validation Sakari Ailus
2015-04-08 11:23 ` Mauro Carvalho Chehab [this message]
2015-04-08 11:33   ` Sakari Ailus
2015-04-08 13:50 ` Laurent Pinchart
2015-04-08 13:53   ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150408082342.1ff93eef@recife.lan \
    --to=mchehab@osg.samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.