Re: [PATCH 1/1] V4L: Events: Replace bad WARN_ON() with assert_spin_locked()

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

 



On Monday 03 May 2010 17:42:46 Sakari Ailus wrote:
> spin_is_locked() always returns zero when spinlock debugging is
> disabled on a single CPU machine. Replace WARN_ON() with
> assert_spin_locked().
> 
> Thanks to Laurent Pinchart for spotting this!
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxxxxxxxxxxxxx>

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

> ---
>  drivers/media/video/v4l2-event.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/v4l2-event.c
> b/drivers/media/video/v4l2-event.c index 170e40f..91bb1c8 100644
> --- a/drivers/media/video/v4l2-event.c
> +++ b/drivers/media/video/v4l2-event.c
> @@ -152,7 +152,7 @@ static struct v4l2_subscribed_event
> *v4l2_event_subscribed( struct v4l2_events *events = fh->events;
>  	struct v4l2_subscribed_event *sev;
> 
> -	WARN_ON(!spin_is_locked(&fh->vdev->fh_lock));
> +	assert_spin_locked(&fh->vdev->fh_lock);
> 
>  	list_for_each_entry(sev, &events->subscribed, list) {
>  		if (sev->type == type)

-- 
Regards,

Laurent Pinchart
--
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