]>
Commit | Line | Data |
---|---|---|
15bfdeb4 GKH |
1 | From 5e99456c20f712dcc13d9f6ca4278937d5367355 Mon Sep 17 00:00:00 2001 |
2 | From: Hans Verkuil <hverkuil-cisco@xs4all.nl> | |
3 | Date: Mon, 19 Nov 2018 10:33:44 -0500 | |
4 | Subject: media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused() | |
5 | ||
6 | From: Hans Verkuil <hverkuil-cisco@xs4all.nl> | |
7 | ||
8 | commit 5e99456c20f712dcc13d9f6ca4278937d5367355 upstream. | |
9 | ||
10 | Userspace shouldn't set bytesused to 0 for output buffers. | |
11 | vb2_warn_zero_bytesused() warns about this (only once!), but it also | |
12 | calls WARN_ON(1), which is confusing since it is not immediately clear | |
13 | that it warns about a 0 value for bytesused. | |
14 | ||
15 | Just drop the WARN_ON as it serves no purpose. | |
16 | ||
17 | Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> | |
18 | Acked-by: Ezequiel Garcia <ezequiel@collabora.com> | |
19 | Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | |
20 | Cc: Matthias Maennich <maennich@google.com> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
22 | ||
7a531351 GKH |
23 | --- |
24 | drivers/media/v4l2-core/videobuf2-v4l2.c | 1 - | |
25 | 1 file changed, 1 deletion(-) | |
26 | ||
27 | --- a/drivers/media/v4l2-core/videobuf2-v4l2.c | |
28 | +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c | |
29 | @@ -145,7 +145,6 @@ static void vb2_warn_zero_bytesused(stru | |
15bfdeb4 GKH |
30 | return; |
31 | ||
32 | check_once = true; | |
33 | - WARN_ON(1); | |
34 | ||
35 | pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n"); | |
36 | if (vb->vb2_queue->allow_zero_bytesused) |