All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Kaneko <ykaneko0929@gmail.com>, linux-media@vger.kernel.org
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC] media: soc_camera: rcar_vin: Fix wait_for_completion
Date: Sun, 15 Mar 2015 21:37:59 +0000	[thread overview]
Message-ID: <5505FBB7.2020907@cogentembedded.com> (raw)
In-Reply-To: <1426430373-3443-1-git-send-email-ykaneko0929@gmail.com>

Hello.

On 03/15/2015 05:39 PM, Yoshihiro Kaneko wrote:

> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>

> When stopping abnormally, a driver can't return from wait_for_completion.
> This patch resolved this problem by changing wait_for_completion_timeout
> from wait_for_completion.

> Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---

[...]

> diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
> index 279ab9f..ff0359b 100644
> --- a/drivers/media/platform/soc_camera/rcar_vin.c
> +++ b/drivers/media/platform/soc_camera/rcar_vin.c
[...]
> @@ -821,6 +823,10 @@ static void rcar_vin_wait_stop_streaming(struct rcar_vin_priv *priv)
>   			priv->request_to_stop = true;
>   			spin_unlock_irq(&priv->lock);
>   			wait_for_completion(&priv->capture_stop);

    You forgot to remove this line, as already noted.

> +			if (!wait_for_completion_timeout(
> +				&priv->capture_stop,
> +				msecs_to_jiffies(TIMEOUT_MS)))

    Please indent the above 2 lines more to the right, so that they're easier 
on the eyes with the following line.

> +				priv->state = STOPPED;
>   			spin_lock_irq(&priv->lock);
>   		}
>   	}

WBR, Sergei


WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Kaneko <ykaneko0929@gmail.com>, linux-media@vger.kernel.org
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC] media: soc_camera: rcar_vin: Fix wait_for_completion
Date: Mon, 16 Mar 2015 00:37:59 +0300	[thread overview]
Message-ID: <5505FBB7.2020907@cogentembedded.com> (raw)
In-Reply-To: <1426430373-3443-1-git-send-email-ykaneko0929@gmail.com>

Hello.

On 03/15/2015 05:39 PM, Yoshihiro Kaneko wrote:

> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com>

> When stopping abnormally, a driver can't return from wait_for_completion.
> This patch resolved this problem by changing wait_for_completion_timeout
> from wait_for_completion.

> Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> ---

[...]

> diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
> index 279ab9f..ff0359b 100644
> --- a/drivers/media/platform/soc_camera/rcar_vin.c
> +++ b/drivers/media/platform/soc_camera/rcar_vin.c
[...]
> @@ -821,6 +823,10 @@ static void rcar_vin_wait_stop_streaming(struct rcar_vin_priv *priv)
>   			priv->request_to_stop = true;
>   			spin_unlock_irq(&priv->lock);
>   			wait_for_completion(&priv->capture_stop);

    You forgot to remove this line, as already noted.

> +			if (!wait_for_completion_timeout(
> +				&priv->capture_stop,
> +				msecs_to_jiffies(TIMEOUT_MS)))

    Please indent the above 2 lines more to the right, so that they're easier 
on the eyes with the following line.

> +				priv->state = STOPPED;
>   			spin_lock_irq(&priv->lock);
>   		}
>   	}

WBR, Sergei


  parent reply	other threads:[~2015-03-15 21:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-15 14:39 [PATCH/RFC] media: soc_camera: rcar_vin: Fix wait_for_completion Yoshihiro Kaneko
2015-03-15 14:39 ` Yoshihiro Kaneko
2015-03-15 14:46 ` Guennadi Liakhovetski
2015-03-15 14:46   ` Guennadi Liakhovetski
2015-03-16 13:44   ` Yoshihiro Kaneko
2015-03-16 13:44     ` Yoshihiro Kaneko
2015-03-15 21:37 ` Sergei Shtylyov [this message]
2015-03-15 21:37   ` Sergei Shtylyov

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=5505FBB7.2020907@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=horms@verge.net.au \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=ykaneko0929@gmail.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.