Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715075 > unrolled thread

[PATCH 3.16 038/134] [media] uvcvideo: Fix empty packet statistic

Started byBen Hutchings <ben@decadent.org.uk>
First post2017-08-18 16:00 +0200
Last post2017-08-18 16:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16 038/134] [media] uvcvideo: Fix empty packet statistic Ben Hutchings <ben@decadent.org.uk> - 2017-08-18 16:00 +0200

#1715075 — [PATCH 3.16 038/134] [media] uvcvideo: Fix empty packet statistic

FromBen Hutchings <ben@decadent.org.uk>
Date2017-08-18 16:00 +0200
Subject[PATCH 3.16 038/134] [media] uvcvideo: Fix empty packet statistic
Message-ID<ufPYC-4vA-33@gated-at.bofh.it>
3.16.47-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Kieran Bingham <kieran.bingham@ideasonboard.com>

commit 360a3a90c6261fe24a959ff38f8f6c3a8468f23c upstream.

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>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/media/usb/uvc/uvc_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -810,7 +810,7 @@ static void uvc_video_stats_decode(struc
 
 	/* 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)

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web