All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kernel-janitors@vger.kernel.org,
	Sergio Aguirre <sergio.a.aguirre@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	linux-media@vger.kernel.org
Subject: Re: [patch v2] [media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next()
Date: Thu, 19 Dec 2013 01:03:05 +0000	[thread overview]
Message-ID: <9772816.NZs94s1p3P@avalon> (raw)
In-Reply-To: <20131216150612.GA15506@elgon.mountain>

Hi Dan,

Thank you for the patch.

On Wednesday 18 December 2013 10:29:24 Dan Carpenter wrote:
> The spin_lock_irqsave() macro is not nestable.  The second call will
> overwrite the first record of "flags" so the IRQs will not be enabled
> correctly at the end of the function.
> 
> In the current code, this function is always called from the IRQ handler
> so everything works fine and this fix doesn't change anything.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree. I'll send a pull request shortly.

> ---
> v2:  Updated the change log
> 
> diff --git a/drivers/staging/media/omap4iss/iss_video.c
> b/drivers/staging/media/omap4iss/iss_video.c index
> 766491e6a8d0..c9b71c750b15 100644
> --- a/drivers/staging/media/omap4iss/iss_video.c
> +++ b/drivers/staging/media/omap4iss/iss_video.c
> @@ -451,9 +451,9 @@ struct iss_buffer *omap4iss_video_buffer_next(struct
> iss_video *video) }
> 
>  	if (video->type = V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->input != NULL) {
> -		spin_lock_irqsave(&pipe->lock, flags);
> +		spin_lock(&pipe->lock);
>  		pipe->state &= ~ISS_PIPELINE_STREAM;
> -		spin_unlock_irqrestore(&pipe->lock, flags);
> +		spin_unlock(&pipe->lock);
>  	}
> 
>  	buf = list_first_entry(&video->dmaqueue, struct iss_buffer,

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kernel-janitors@vger.kernel.org,
	Sergio Aguirre <sergio.a.aguirre@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	linux-media@vger.kernel.org
Subject: Re: [patch v2] [media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next()
Date: Thu, 19 Dec 2013 02:03:05 +0100	[thread overview]
Message-ID: <9772816.NZs94s1p3P@avalon> (raw)
In-Reply-To: <20131216150612.GA15506@elgon.mountain>

Hi Dan,

Thank you for the patch.

On Wednesday 18 December 2013 10:29:24 Dan Carpenter wrote:
> The spin_lock_irqsave() macro is not nestable.  The second call will
> overwrite the first record of "flags" so the IRQs will not be enabled
> correctly at the end of the function.
> 
> In the current code, this function is always called from the IRQ handler
> so everything works fine and this fix doesn't change anything.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree. I'll send a pull request shortly.

> ---
> v2:  Updated the change log
> 
> diff --git a/drivers/staging/media/omap4iss/iss_video.c
> b/drivers/staging/media/omap4iss/iss_video.c index
> 766491e6a8d0..c9b71c750b15 100644
> --- a/drivers/staging/media/omap4iss/iss_video.c
> +++ b/drivers/staging/media/omap4iss/iss_video.c
> @@ -451,9 +451,9 @@ struct iss_buffer *omap4iss_video_buffer_next(struct
> iss_video *video) }
> 
>  	if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->input != NULL) {
> -		spin_lock_irqsave(&pipe->lock, flags);
> +		spin_lock(&pipe->lock);
>  		pipe->state &= ~ISS_PIPELINE_STREAM;
> -		spin_unlock_irqrestore(&pipe->lock, flags);
> +		spin_unlock(&pipe->lock);
>  	}
> 
>  	buf = list_first_entry(&video->dmaqueue, struct iss_buffer,

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2013-12-19  1:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 15:06 [media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next() Dan Carpenter
2013-12-18  7:29 ` [patch v2] " Dan Carpenter
2013-12-17 17:28 ` Laurent Pinchart
2013-12-17 17:28   ` Laurent Pinchart
2013-12-19  1:03 ` Laurent Pinchart [this message]
2013-12-19  1:03   ` [patch v2] " Laurent Pinchart

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=9772816.NZs94s1p3P@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hans.verkuil@cisco.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=sergio.a.aguirre@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.