From: Ezequiel Garcia <ezequiel@collabora.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
Date: Mon, 19 Nov 2018 12:52:21 -0300 [thread overview]
Message-ID: <24f4a902b8e07536e48998b68ea289019d8e23a2.camel@collabora.com> (raw)
In-Reply-To: <b3fae3d4-2370-d99a-b997-d6ae13cebe85@xs4all.nl>
On Mon, 2018-11-19 at 16:33 +0100, Hans Verkuil wrote:
> Userspace shouldn't set bytesused to 0 for output buffers.
> vb2_warn_zero_bytesused() warns about this (only once!), but it also
> calls WARN_ON(1), which is confusing since it is not immediately clear
> that it warns about a 0 value for bytesused.
>
> Just drop the WARN_ON as it serves no purpose.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
> diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
> index a17033ab2c22..713326ef4e72 100644
> --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
> +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
> @@ -158,7 +158,6 @@ static void vb2_warn_zero_bytesused(struct vb2_buffer *vb)
> return;
>
> check_once = true;
> - WARN_ON(1);
>
> pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
> if (vb->vb2_queue->allow_zero_bytesused)
prev parent reply other threads:[~2018-11-20 2:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 15:33 [PATCH] videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused() Hans Verkuil
2018-11-19 15:52 ` Ezequiel Garcia [this message]
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=24f4a902b8e07536e48998b68ea289019d8e23a2.camel@collabora.com \
--to=ezequiel@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).