diff mbox series

media: vb2: fix confusing log message

Message ID 5103405d-c560-425d-b307-835896943b94@xs4all.nl (mailing list archive)
State New
Headers show
Series media: vb2: fix confusing log message | expand

Commit Message

Hans Verkuil Oct. 24, 2024, 11:24 a.m. UTC
If the number of allocated buffers is less than q->min_queued_buffers,
then a debug message was logged saying that it needs at least that
many queued buffers. But the test is about allocated buffers.

Update the message to say "allocated buffers".

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
---

Comments

Nicolas Dufresne Oct. 24, 2024, 7:15 p.m. UTC | #1
Le jeudi 24 octobre 2024 à 13:24 +0200, Hans Verkuil a écrit :
> If the number of allocated buffers is less than q->min_queued_buffers,
> then a debug message was logged saying that it needs at least that
> many queued buffers. But the test is about allocated buffers.
> 
> Update the message to say "allocated buffers".
> 
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

Makes more sense now.

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
> index d064e0664851..26228614ddcc 100644
> --- a/drivers/media/common/videobuf2/videobuf2-core.c
> +++ b/drivers/media/common/videobuf2/videobuf2-core.c
> @@ -2329,7 +2329,7 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
>  	}
> 
>  	if (q_num_bufs < q->min_queued_buffers) {
> -		dprintk(q, 1, "need at least %u queued buffers\n",
> +		dprintk(q, 1, "need at least %u allocated buffers\n",
>  			q->min_queued_buffers);
>  		return -EINVAL;
>  	}
>
Tomasz Figa Oct. 25, 2024, 4:18 a.m. UTC | #2
On Thu, Oct 24, 2024 at 8:24 PM Hans Verkuil <hverkuil@xs4all.nl> wrote:
>
> If the number of allocated buffers is less than q->min_queued_buffers,
> then a debug message was logged saying that it needs at least that
> many queued buffers. But the test is about allocated buffers.
>
> Update the message to say "allocated buffers".
>
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
> ---
> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
> index d064e0664851..26228614ddcc 100644
> --- a/drivers/media/common/videobuf2/videobuf2-core.c
> +++ b/drivers/media/common/videobuf2/videobuf2-core.c
> @@ -2329,7 +2329,7 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
>         }
>
>         if (q_num_bufs < q->min_queued_buffers) {
> -               dprintk(q, 1, "need at least %u queued buffers\n",
> +               dprintk(q, 1, "need at least %u allocated buffers\n",
>                         q->min_queued_buffers);
>                 return -EINVAL;
>         }

Acked-by: Tomasz Figa <tfiga@chromium.org>

Best,
Tomasz
diff mbox series

Patch

diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index d064e0664851..26228614ddcc 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -2329,7 +2329,7 @@  int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
 	}

 	if (q_num_bufs < q->min_queued_buffers) {
-		dprintk(q, 1, "need at least %u queued buffers\n",
+		dprintk(q, 1, "need at least %u allocated buffers\n",
 			q->min_queued_buffers);
 		return -EINVAL;
 	}