* [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl
@ 2024-11-29 15:17 Xiong Nandi
2024-11-29 18:18 ` Ricardo Ribalda
2024-12-02 15:04 ` Hans de Goede
0 siblings, 2 replies; 4+ messages in thread
From: Xiong Nandi @ 2024-11-29 15:17 UTC (permalink / raw)
To: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab
Cc: Xiong Nandi, linux-media, linux-kernel
uvc_query_name was introduced to print query name in uvc_query_ctrl.
So we can also use it in uvc_get_video_ctrl.
Signed-off-by: Xiong Nandi <xndchn@gmail.com>
---
drivers/media/usb/uvc/uvc_video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index e00f38dd07d9..93cacd2c8721 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl
2024-11-29 15:17 [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl Xiong Nandi
@ 2024-11-29 18:18 ` Ricardo Ribalda
2024-11-29 21:43 ` Laurent Pinchart
2024-12-02 15:04 ` Hans de Goede
1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Ribalda @ 2024-11-29 18:18 UTC (permalink / raw)
To: Xiong Nandi
Cc: Laurent Pinchart, Hans de Goede, Mauro Carvalho Chehab,
linux-media, linux-kernel
On Fri, 29 Nov 2024 at 16:18, Xiong Nandi <xndchn@gmail.com> wrote:
>
> uvc_query_name was introduced to print query name in uvc_query_ctrl.
> So we can also use it in uvc_get_video_ctrl.
>
> Signed-off-by: Xiong Nandi <xndchn@gmail.com>
> ---
> drivers/media/usb/uvc/uvc_video.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index e00f38dd07d9..93cacd2c8721 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -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:
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> ret = (ret == -EPROTO) ? -EPROTO : -EIO;
> goto out;
> }
> --
> 2.25.1
>
>
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl
2024-11-29 18:18 ` Ricardo Ribalda
@ 2024-11-29 21:43 ` Laurent Pinchart
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2024-11-29 21:43 UTC (permalink / raw)
To: Ricardo Ribalda
Cc: Xiong Nandi, Hans de Goede, Mauro Carvalho Chehab, linux-media,
linux-kernel
On Fri, Nov 29, 2024 at 07:18:55PM +0100, Ricardo Ribalda wrote:
> On Fri, 29 Nov 2024 at 16:18, Xiong Nandi <xndchn@gmail.com> wrote:
> >
> > uvc_query_name was introduced to print query name in uvc_query_ctrl.
> > So we can also use it in uvc_get_video_ctrl.
> >
> > Signed-off-by: Xiong Nandi <xndchn@gmail.com>
> > ---
> > drivers/media/usb/uvc/uvc_video.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> > index e00f38dd07d9..93cacd2c8721 100644
> > --- a/drivers/media/usb/uvc/uvc_video.c
> > +++ b/drivers/media/usb/uvc/uvc_video.c
> > @@ -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.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> With that change:
>
> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
>
> > ret = (ret == -EPROTO) ? -EPROTO : -EIO;
> > goto out;
> > }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl
2024-11-29 15:17 [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl Xiong Nandi
2024-11-29 18:18 ` Ricardo Ribalda
@ 2024-12-02 15:04 ` Hans de Goede
1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2024-12-02 15:04 UTC (permalink / raw)
To: Xiong Nandi, Laurent Pinchart, Mauro Carvalho Chehab
Cc: linux-media, linux-kernel
Hi,
On 29-Nov-24 4:17 PM, Xiong Nandi wrote:
> uvc_query_name was introduced to print query name in uvc_query_ctrl.
> So we can also use it in uvc_get_video_ctrl.
>
> Signed-off-by: Xiong Nandi <xndchn@gmail.com>
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
> ---
> drivers/media/usb/uvc/uvc_video.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index e00f38dd07d9..93cacd2c8721 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-02 15:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-29 15:17 [PATCH] media: uvcvideo: Use uvc_query_name in uvc_get_video_ctrl Xiong Nandi
2024-11-29 18:18 ` Ricardo Ribalda
2024-11-29 21:43 ` Laurent Pinchart
2024-12-02 15:04 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox