lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9fb5f3f-5a2c-a43a-3964-284e7abb89c1@xs4all.nl>
Date:   Sat, 20 Mar 2021 08:25:30 +0100
From:   Hans Verkuil <hverkuil-cisco@...all.nl>
To:     Ricardo Ribalda <ribalda@...omium.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        tfiga@...omium.org
Subject: Re: [PATCH v8 05/19] media: uvcvideo: Remove s_ctrl and g_ctrl

On 19/03/2021 18:08, Ricardo Ribalda wrote:
> If we do not implement these callback the framework will call the ext_ctrl
> callbaks instead, which are a superset of this functions.

callbaks -> callbacks

With that changed you can add my:

Reviewed-by: Hans Verkuil <hverkuil-cisco@...all.nl>

Regards,

	Hans

> 
> Suggested-by: Hans Verkuil <hverkuil-cisco@...all.nl>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
>  drivers/media/usb/uvc/uvc_v4l2.c | 56 --------------------------------
>  1 file changed, 56 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> index 47b0e3224205..ac98869d5a05 100644
> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> @@ -983,60 +983,6 @@ static int uvc_ioctl_query_ext_ctrl(struct file *file, void *fh,
>  	return 0;
>  }
>  
> -static int uvc_ioctl_g_ctrl(struct file *file, void *fh,
> -			    struct v4l2_control *ctrl)
> -{
> -	struct uvc_fh *handle = fh;
> -	struct uvc_video_chain *chain = handle->chain;
> -	struct v4l2_ext_control xctrl;
> -	int ret;
> -
> -	memset(&xctrl, 0, sizeof(xctrl));
> -	xctrl.id = ctrl->id;
> -
> -	ret = uvc_ctrl_begin(chain);
> -	if (ret < 0)
> -		return ret;
> -
> -	ret = uvc_ctrl_get(chain, &xctrl);
> -	uvc_ctrl_rollback(handle);
> -	if (ret < 0)
> -		return ret;
> -
> -	ctrl->value = xctrl.value;
> -	return 0;
> -}
> -
> -static int uvc_ioctl_s_ctrl(struct file *file, void *fh,
> -			    struct v4l2_control *ctrl)
> -{
> -	struct uvc_fh *handle = fh;
> -	struct uvc_video_chain *chain = handle->chain;
> -	struct v4l2_ext_control xctrl;
> -	int ret;
> -
> -	memset(&xctrl, 0, sizeof(xctrl));
> -	xctrl.id = ctrl->id;
> -	xctrl.value = ctrl->value;
> -
> -	ret = uvc_ctrl_begin(chain);
> -	if (ret < 0)
> -		return ret;
> -
> -	ret = uvc_ctrl_set(handle, &xctrl);
> -	if (ret < 0) {
> -		uvc_ctrl_rollback(handle);
> -		return ret;
> -	}
> -
> -	ret = uvc_ctrl_commit(handle, &xctrl, 1);
> -	if (ret < 0)
> -		return ret;
> -
> -	ctrl->value = xctrl.value;
> -	return 0;
> -}
> -
>  static int uvc_ioctl_g_ext_ctrls(struct file *file, void *fh,
>  				 struct v4l2_ext_controls *ctrls)
>  {
> @@ -1522,8 +1468,6 @@ const struct v4l2_ioctl_ops uvc_ioctl_ops = {
>  	.vidioc_s_input = uvc_ioctl_s_input,
>  	.vidioc_queryctrl = uvc_ioctl_queryctrl,
>  	.vidioc_query_ext_ctrl = uvc_ioctl_query_ext_ctrl,
> -	.vidioc_g_ctrl = uvc_ioctl_g_ctrl,
> -	.vidioc_s_ctrl = uvc_ioctl_s_ctrl,
>  	.vidioc_g_ext_ctrls = uvc_ioctl_g_ext_ctrls,
>  	.vidioc_s_ext_ctrls = uvc_ioctl_s_ext_ctrls,
>  	.vidioc_try_ext_ctrls = uvc_ioctl_try_ext_ctrls,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ