[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9e693a2-845f-9ef1-e3cb-724cece84756@redhat.com>
Date: Thu, 12 Oct 2023 14:10:24 +0200
From: Hans de Goede <hdegoede@...hat.com>
To: Benjamin Gaignard <benjamin.gaignard@...labora.com>,
mchehab@...nel.org, tfiga@...omium.org, m.szyprowski@...sung.com,
ming.qian@....com, ezequiel@...guardiasur.com.ar,
p.zabel@...gutronix.de, gregkh@...uxfoundation.org,
hverkuil-cisco@...all.nl, nicolas.dufresne@...labora.com
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-staging@...ts.linux.dev,
kernel@...labora.com, Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH v11 17/56] media: atomisp: Stop direct calls to queue
num_buffers field
Hi,
On 10/12/23 13:46, Benjamin Gaignard wrote:
> Use vb2_get_num_buffers() to avoid using queue num_buffers field directly.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
> CC: Hans de Goede <hdegoede@...hat.com>
> CC: Sakari Ailus <sakari.ailus@...ux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@...hat.com>
Regards,
Hans
> ---
> drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> index a8a964b2f1a8..09c0091b920f 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> @@ -1028,7 +1028,7 @@ static int atomisp_qbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer
> struct atomisp_device *isp = video_get_drvdata(vdev);
> struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
>
> - if (buf->index >= vdev->queue->num_buffers)
> + if (buf->index >= vb2_get_num_buffers(vdev->queue))
> return -EINVAL;
>
> if (buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING) {
Powered by blists - more mailing lists