Message ID | 7efb10d8dc70ea3000cc70dca53407c52488acd1.1684000646.git.mchehab@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp5902644vqo; Sat, 13 May 2023 10:59:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ625+FAE1SOSK4V3HlFceUHA9iweETMm0J3VYblB8ss1jKCw8nJHBXoKQeokgdzmMGsnp4k X-Received: by 2002:a17:902:c20c:b0:1ab:16d5:998 with SMTP id 12-20020a170902c20c00b001ab16d50998mr27990065pll.26.1684000786024; Sat, 13 May 2023 10:59:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684000786; cv=none; d=google.com; s=arc-20160816; b=NTg/jgUc9hyMY8d5dMtQrFZ2LIsoivT1F8L2Mh4RtuqkF9uvEwHZd6OnCsmQ5S8fCL +vg9J7KbTjrxTTwRkDzQe6XQQ+JknVw4KovRuyslvVMoKX2dFw++kMr8O7x42mH0InJy T4HA09QfyMuHaXCIJK7ZGvm1C08gUC4dn+Q4t1lpGeORylrNYiSW6Wa3loDM5iEuIbyo nyBXAwvBYLKEPWYkwwr/EB/DcCjd8XziLJpRsIbWSszWQJZVsX6wnZkLRW/nErIJTQd/ Tq7iMr6OKu8HtoqpX0yuix9n9jIA70DfuaffWklP2TcKmgXRWA6NsKY950lwPrUOVZlk s80Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=ClpJoEMgiZAt/D2Ot9OgMMF7UDadDTSu823WGjwcyqU=; b=AbRMDKv9rnB4vpPwOcaZM8OoN0QFJT9mQAuqIEEb4o2K70NP+sxpg21i1tKwUi4i1M bnp96ZdiTXSIq70TgDmFTEc/lI3sk0cxDMFxu8LBiFPt+FcJi0jF7XBgrouGeW/HOSfB a5GjwqPdPivQtpRerHmMFkt8r/ixU28eSUASm3FYmHz/kgxWeJ4taCJJR7SKgigi6Vl+ GK2R3/vEXWDOBormWNIXr4RWi6vObxUkCQoGIs8AYRfcpWsSMr7mtmQeFpe8pbu/XcVh RKP20jQYr3C4T0+C5hM5ACSxG0n3z2YHp9nJVwo4nk/nCnxWcqPCtKwExzh3PugCD0Br FeDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=leHrrPU4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a170902ec8400b001adf0f9cf6fsi3140452plg.303.2023.05.13.10.59.31; Sat, 13 May 2023 10:59:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=leHrrPU4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237273AbjEMR62 (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Sat, 13 May 2023 13:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233142AbjEMR5u (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 13 May 2023 13:57:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46F3F2D48; Sat, 13 May 2023 10:57:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3DA5361BD9; Sat, 13 May 2023 17:57:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 253B0C433A0; Sat, 13 May 2023 17:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684000666; bh=ZWmeJZ/Ufh5VsGOpRReQ7tvdGJoDfmcW2OUU8dlQK1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=leHrrPU4L07+sI6wLbyavIKomP2AKvmdOe63+HW74g73HPOWUbWq3dIQmzZO7VvJn 4BiQmCq4lP7gLorBprdEXyGgurm6vlZdYtQ0sTrOQLbq2ZKmG+DGDAaekJxH3W5Osx ZIXiENzPTdgU3oX7VAE5OA419pTSUssEwSo4TThvIoZvPC9Qr6ZxlSG59Dr35rYMDh oIao6auS8kJDyeR1LCHMUjkJRtPPWA4TgKavMLusEX2658UB3dvYzmKAqoafvyLxCG ijkJiViZzDSfqAKVZ7/wfy8jlSiUEDXIuvyisdZACLqCDwoG1TDuZTqVY/DmuR6Xfi EDJQDN581wXhw== Received: from mchehab by mail.kernel.org with local (Exim 4.96) (envelope-from <mchehab@kernel.org>) id 1pxtV1-001txV-0s; Sat, 13 May 2023 18:57:43 +0100 From: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: YongSu Yoo <yongsuyoo0215@gmail.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 02/24] media: dvb_demux: fix a bug for the continuity counter Date: Sat, 13 May 2023 18:57:19 +0100 Message-Id: <7efb10d8dc70ea3000cc70dca53407c52488acd1.1684000646.git.mchehab@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <53558de2b5c4f4ee6bfcfbe34e27071c2d0073d5.1684000646.git.mchehab@kernel.org> References: <53558de2b5c4f4ee6bfcfbe34e27071c2d0073d5.1684000646.git.mchehab@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765802808531830086?= X-GMAIL-MSGID: =?utf-8?q?1765802808531830086?= |
Series |
[01/24] media: pvrusb2: fix DVB_CORE dependency
|
|
Commit Message
Mauro Carvalho Chehab
May 13, 2023, 5:57 p.m. UTC
From: YongSu Yoo <yongsuyoo0215@gmail.com> In dvb_demux.c, some logics exist which compare the expected continuity counter and the real continuity counter. If they are not matched each other, both of the expected continuity counter and the real continuity counter should be printed. But there exists a bug that the expected continuity counter is not correctly printed. The expected continuity counter is replaced with the real countinuity counter + 1 so that the epected continuity counter is not correclty printed. This is wrong. This bug is fixed. Link: https://lore.kernel.org/linux-media/20230305212519.499-1-yongsuyoo0215@gmail.com Signed-off-by: YongSu Yoo <yongsuyoo0215@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> --- drivers/media/dvb-core/dvb_demux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-core/dvb_demux.c b/drivers/media/dvb-core/dvb_demux.c index 398c86279b5b..7c4d86bfdd6c 100644 --- a/drivers/media/dvb-core/dvb_demux.c +++ b/drivers/media/dvb-core/dvb_demux.c @@ -115,12 +115,12 @@ static inline int dvb_dmx_swfilter_payload(struct dvb_demux_feed *feed, cc = buf[3] & 0x0f; ccok = ((feed->cc + 1) & 0x0f) == cc; - feed->cc = cc; if (!ccok) { set_buf_flags(feed, DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED); dprintk_sect_loss("missed packet: %d instead of %d!\n", cc, (feed->cc + 1) & 0x0f); } + feed->cc = cc; if (buf[1] & 0x40) // PUSI ? feed->peslen = 0xfffa; @@ -300,7 +300,6 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, cc = buf[3] & 0x0f; ccok = ((feed->cc + 1) & 0x0f) == cc; - feed->cc = cc; if (buf[3] & 0x20) { /* adaption field present, check for discontinuity_indicator */ @@ -336,6 +335,7 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, feed->pusi_seen = false; dvb_dmx_swfilter_section_new(feed); } + feed->cc = cc; if (buf[1] & 0x40) { /* PUSI=1 (is set), section boundary is here */