Linux USB
 help / color / mirror / Atom feed
From: Dan Scally <dan.scally@ideasonboard.com>
To: Michael Tretter <m.tretter@pengutronix.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>,
	linux-usb@vger.kernel.org, linux-media@vger.kernel.org,
	kernel@pengutronix.de
Subject: Re: [PATCH 1/8] usb: gadget: uvc: use fourcc printk helper
Date: Fri, 24 Mar 2023 07:44:19 +0000	[thread overview]
Message-ID: <562c5bf2-eeb0-b579-99b3-5a1a18b132b3@ideasonboard.com> (raw)
In-Reply-To: <20230323-uvc-gadget-cleanup-v1-1-e41f0c5d9d8e@pengutronix.de>

Morning Michael

On 23/03/2023 11:41, Michael Tretter wrote:
> There is a format helper for printing fourcc codes. Use that one instead
> of manually formatting the pixelformat for printing.
>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---


Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

>   drivers/usb/gadget/function/uvc_v4l2.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c
> index 3f0a9795c0d4..13c7ba06f994 100644
> --- a/drivers/usb/gadget/function/uvc_v4l2.c
> +++ b/drivers/usb/gadget/function/uvc_v4l2.c
> @@ -240,16 +240,13 @@ uvc_v4l2_try_format(struct file *file, void *fh, struct v4l2_format *fmt)
>   	struct uvc_video *video = &uvc->video;
>   	struct uvcg_format *uformat;
>   	struct uvcg_frame *uframe;
> -	u8 *fcc;
>   
>   	if (fmt->type != video->queue.queue.type)
>   		return -EINVAL;
>   
> -	fcc = (u8 *)&fmt->fmt.pix.pixelformat;
> -	uvcg_dbg(&uvc->func, "Trying format 0x%08x (%c%c%c%c): %ux%u\n",
> -		fmt->fmt.pix.pixelformat,
> -		fcc[0], fcc[1], fcc[2], fcc[3],
> -		fmt->fmt.pix.width, fmt->fmt.pix.height);
> +	uvcg_dbg(&uvc->func, "Trying format %p4cc: %ux%u\n",
> +		 &fmt->fmt.pix.pixelformat,
> +		 fmt->fmt.pix.width, fmt->fmt.pix.height);
>   
>   	uformat = find_format_by_pix(uvc, fmt->fmt.pix.pixelformat);
>   	if (!uformat)
>

  reply	other threads:[~2023-03-24  7:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 11:41 [PATCH 0/8] usb: gadget: uvc: fix errors reported by v4l2-compliance Michael Tretter
2023-03-23 11:41 ` [PATCH 1/8] usb: gadget: uvc: use fourcc printk helper Michael Tretter
2023-03-24  7:44   ` Dan Scally [this message]
2023-03-24  9:21   ` Laurent Pinchart
2023-03-23 11:41 ` [PATCH 2/8] usb: gadget: uvc: fix return code of REQBUFS Michael Tretter
2023-03-24  7:50   ` Dan Scally
2023-03-24  9:25     ` Laurent Pinchart
2023-03-23 11:41 ` [PATCH 3/8] usb: gadget: uvc: implement s/g_output ioctl Michael Tretter
2023-03-24  9:20   ` Laurent Pinchart
2023-03-24  9:21     ` Dan Scally
2023-03-24  9:39       ` Hans Verkuil
2023-03-24  9:49         ` Laurent Pinchart
2023-03-23 11:41 ` [PATCH 4/8] usb: gadget: uvc: move video format initialization to uvc_v4l2 Michael Tretter
2023-03-24  9:31   ` Laurent Pinchart
2023-03-23 11:41 ` [PATCH 5/8] usb: gadget: uvc: initialize video format using configfs Michael Tretter
2023-03-23 11:41 ` [PATCH 6/8] usb: gadget: uvc: try harder to find a valid format Michael Tretter
2023-03-24  9:35   ` Laurent Pinchart
2023-03-23 11:41 ` [PATCH 7/8] usb: gadget: uvc: add colorspace handling Michael Tretter
2023-03-24  9:33   ` Laurent Pinchart
2023-03-23 11:41 ` [PATCH 8/8] usb: gadget: uvc: implement s/g_parm Michael Tretter
2023-03-23 18:02   ` kernel test robot
2023-03-24  9:32   ` Laurent Pinchart
2023-03-24  9:38 ` [PATCH 0/8] usb: gadget: uvc: fix errors reported by v4l2-compliance Laurent Pinchart
2023-03-27 12:26   ` Michael Tretter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=562c5bf2-eeb0-b579-99b3-5a1a18b132b3@ideasonboard.com \
    --to=dan.scally@ideasonboard.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=m.tretter@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox