media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl
Subsystems (2)
PATCH 1/1 media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl
uvc_query_name was introduced to print query name in uvc_query_ctrl. So we can also use it in uvc_get_video_ctrl.
--- drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/uvc/uvc_video.c +2 -2
@@ -297,8 +297,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, goto out; }else if (ret != size) {dev_err (&stream->intf->dev, -"Failed to query (%u) UVC %s control : %d (exp. %u).\n" , - query, probe ?"probe" :"commit" , ret, size); +"Failed to query (%s) UVC %s control : %d (exp. %u).\n" , +uvc_query_name (query), probe ?"probe" :"commit" , ret, size); ret = (ret == -EPROTO ) ? -EPROTO : -EIO ; goto out; }
Signature · 1 line
2.25.1
Quoted 14 lines · Xiong Nandi
uvc_query_namewas introduced to print query name inuvc_query_ctrl. So we can also use it inuvc_get_video_ctrl.Signed-off-by Xiong Nandi <[email protected]>--- drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/usb/uvc/uvc_video.c +0
-0
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming *stream, · line 301
Quoted 7 lines
drivers/media/usb/uvc/uvc_video.c +2
-2@@ -297,8 +297,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, goto out; }else if (ret != size) {dev_err (&stream->intf->dev, -"Failed to query (%u) UVC %s control : %d (exp. %u).\n" , - query, probe ?"probe" :"commit" , ret, size); +"Failed to query (%s) UVC %s control : %d (exp. %u).\n" , +uvc_query_name (query), probe ?"probe" :"commit" , ret, size);
nit: This is above 80 characters. Please move size to the next line, aligned to uvc_query_name
With that change:
Quoted 7 lines
drivers/media/usb/uvc/uvc_video.c +0
-1ret = (ret == -EPROTO ) ? -EPROTO : -EIO ; goto out; } --2.25.1
Signature · 1 line
Ricardo Ribalda
Quoted 10 lines · Ricardo Ribalda
Quoted 9 lines · Xiong Nandi
uvc_query_namewas introduced to print query name inuvc_query_ctrl. So we can also use it inuvc_get_video_ctrl.Signed-off-by Xiong Nandi <[email protected]>--- drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 15 lines
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming *stream, · line 301
Quoted 12 lines
drivers/media/usb/uvc/uvc_video.c +2
-2@@ -297,8 +297,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, goto out; }else if (ret != size) {dev_err (&stream->intf->dev, -"Failed to query (%u) UVC %s control : %d (exp. %u).\n" , - query, probe ?"probe" :"commit" , ret, size); +"Failed to query (%s) UVC %s control : %d (exp. %u).\n" , +uvc_query_name (query), probe ?"probe" :"commit" , ret, size);nit: This is above 80 characters. Please move size to the next line, aligned to
uvc_query_name
I can make that change when applying the patch, no need to send a new version.
Quoted 7 lines
With that change:
Reviewed-by Ricardo Ribalda <[email protected]>Quoted 3 lines
drivers/media/usb/uvc/uvc_video.c +0
-0ret = (ret == -EPROTO ) ? -EPROTO : -EIO ; goto out; }
Signature · 3 lines
Regards, Laurent Pinchart
Hi,
Quoted 4 lines · Xiong Nandi
uvc_query_namewas introduced to print query name inuvc_query_ctrl. So we can also use it inuvc_get_video_ctrl.Signed-off-by Xiong Nandi <[email protected]>
Thank you for your patch.
I have merged this into:
https://gitlab.freedesktop.org/linux-media/users/uvc/-/commits/next/
with the line-wrapping fixed to 80 chars.
Regards,
Hans
Quoted 19 lines
--- drivers/media/usb/uvc/uvc_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/usb/uvc/uvc_video.c +2
-2@@ -297,8 +297,8 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, goto out; }else if (ret != size) {dev_err (&stream->intf->dev, -"Failed to query (%u) UVC %s control : %d (exp. %u).\n" , - query, probe ?"probe" :"commit" , ret, size); +"Failed to query (%s) UVC %s control : %d (exp. %u).\n" , +uvc_query_name (query), probe ?"probe" :"commit" , ret, size); ret = (ret == -EPROTO ) ? -EPROTO : -EIO ; goto out; }