Re: [REVIEW PATCH 08/11] vb2: simplify a confusing condition.

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

 



On Tue, Mar 11, 2014 at 6:20 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
>
> q->start_streaming_called is always true, so the WARN_ON check against
> it being false can be dropped.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>

Acked-by: Pawel Osciak <pawel@xxxxxxxxxx>

> ---
>  drivers/media/v4l2-core/videobuf2-core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index 8984187..2ae316b 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -1099,9 +1099,8 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
>         if (!q->start_streaming_called) {
>                 if (WARN_ON(state != VB2_BUF_STATE_QUEUED))
>                         state = VB2_BUF_STATE_QUEUED;
> -       } else if (!WARN_ON(!q->start_streaming_called)) {
> -               if (WARN_ON(state != VB2_BUF_STATE_DONE &&
> -                           state != VB2_BUF_STATE_ERROR))
> +       } else if (WARN_ON(state != VB2_BUF_STATE_DONE &&
> +                          state != VB2_BUF_STATE_ERROR)) {
>                         state = VB2_BUF_STATE_ERROR;
>         }
>
> --
> 1.9.0
>



-- 
Best regards,
Pawel Osciak
--
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