From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kieran Bingham <kbingham@kernel.org>
Cc: linux-media@vger.kernel.org,
Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: Re: [PATCH] uvcvideo: Fix empty packet statistic
Date: Mon, 03 Apr 2017 19:10:13 +0300 [thread overview]
Message-ID: <2233324.kYs3IlRQ2o@avalon> (raw)
In-Reply-To: <1491218732-12068-2-git-send-email-kbingham@kernel.org>
Hi Kieran,
Thank you for the patch.
On Monday 03 Apr 2017 12:25:32 Kieran Bingham wrote:
> From: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> The frame counters are inadvertently counting packets with content as
> empty.
>
> Fix it by correcting the logic expression
>
> Fixes: 7bc5edb00bbd [media] uvcvideo: Extract video stream statistics
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
and applied to my tree.
> ---
> drivers/media/usb/uvc/uvc_video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c
> b/drivers/media/usb/uvc/uvc_video.c index 075a0fe77485..7777ed24908b 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -818,7 +818,7 @@ static void uvc_video_stats_decode(struct uvc_streaming
> *stream,
>
> /* Update the packets counters. */
> stream->stats.frame.nb_packets++;
> - if (len > header_size)
> + if (len <= header_size)
> stream->stats.frame.nb_empty++;
>
> if (data[1] & UVC_STREAM_ERR)
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2017-04-03 16:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 11:25 [PATCH] uvcvideo: Fix empty packet statistic Kieran Bingham
2017-04-03 16:10 ` Laurent Pinchart [this message]
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=2233324.kYs3IlRQ2o@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=kbingham@kernel.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/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