Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1725982rdh; Sat, 25 Nov 2023 00:22:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEv+tIbPKAtBB7Da39tsScBuQPIYepW8AVeg0lCVAHFzpH6FqqFclFdEkF+tqxPJlHASHIe X-Received: by 2002:a05:6a00:2d27:b0:6cb:d24b:8c2e with SMTP id fa39-20020a056a002d2700b006cbd24b8c2emr7309433pfb.13.1700900545805; Sat, 25 Nov 2023 00:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700900545; cv=none; d=google.com; s=arc-20160816; b=UiV8ikFoRpwLIVSn3asDBaEJ83A193J3W1eOzKliL/VVH0uX8uHeyp5HNmbiFYIK8X GzXplhqUS6Q+XauOjesNFb2i4lRZNexO0jNvXdXRIeyywP8+71LRP+QEkYoE6jCevoHi KUR6jScwgEEIEXePq4+sRCMou1/EJHgc89R3nhOO7egyGSCfrbaK7xJu5WzB+DC7zBeA 9plpNmOAImbB8uoxImSecpwioQ8rVovtl8VQMZW19AwC6/DuqkV/82xLfabfKMkkhc1G YJDgpRm2TeqJIt7pXL4kOGduoDzFFn1UIBYUU0po5EUoAJZQIlOeUbVpU/sZjYDHyVJm vEYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=HXAMT1m/Mn+bDDg8lCVh+2sMt2ufqIKuHwMzy74xes8=; fh=fgF9zOmwp95gSowcq+JgXs69+tJfESOcGf2ZNGcqZGE=; b=ag0IqrUlXeyI1xn6ZxXKbhda06XD8gP0JRG+O4Ft45qIAXbPELt//shk141PVMUl3+ bI3n/zhMWbdOW9FZ29SmfZg0OSqZMHpQbnvimK6055eQT/9wmXV00GV47DgOM4qkoTJo MTBZoCKHbZD9hZZaMdOVT9dxdMNkjdiw9ncxhZlZQvJWd5m9ODUgHV7Yc5LAu9st5M6d 0jtRmdh1DCjOve42ctQ2jYXra2B9yKBUfdmmg4vD6+V+V1PlIfSlpk0xGZekNBoavjMw RdMcc4lOGftlWkZLFFd7C/I0zclkRSuheanSOgHVRXaxoXd0v04Y1OeopuFmku1vsLQY rDRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iHzxbxUY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z9-20020a056a00240900b00690c23d353asi5455840pfh.217.2023.11.25.00.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 00:22:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iHzxbxUY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6C2F880CBDFC; Sat, 25 Nov 2023 00:22:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231752AbjKYIWI (ORCPT + 99 others); Sat, 25 Nov 2023 03:22:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjKYIWG (ORCPT ); Sat, 25 Nov 2023 03:22:06 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7FDCDB; Sat, 25 Nov 2023 00:22:12 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6c4eaa5202aso2535761b3a.1; Sat, 25 Nov 2023 00:22:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700900532; x=1701505332; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HXAMT1m/Mn+bDDg8lCVh+2sMt2ufqIKuHwMzy74xes8=; b=iHzxbxUYCaJf9UxQflyjp1LehTgiKwq2qfRukvaqrx0MnsDxrT3x2Hy27gMjGo8kBO wDQ67EKvc+CLxMlj92NExqDyObcNy5/38CyyBCD89SPtG3dNwWz5JEqBb6vHjm2unsv2 kIs9H2xcQRCnDo7QHKPq6uzSqZfNRhOWDb+vGx7yj4ifj+DRvCBw/5QUMlw7ccHc9hmS jhpRUPSydFXCPFcYY8AgdIw9OemJeOITyyUD97eXrPoyZp0exPGKBhTyVU6CsaRhcnHR 4m3zF12ITm43Vk+g3QuwW4KI0l8rucROtIesetgUG6/AT0D+g2r1D6lu7BVnil/7mI4S Mv/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700900532; x=1701505332; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HXAMT1m/Mn+bDDg8lCVh+2sMt2ufqIKuHwMzy74xes8=; b=lS8C9MSEPjStTnPCPuckcWDUe1baljTaTGem1c2y7DQ3EJ2OMPbEkUlycynNNwFEFV jDtMrX93TQKTQKORZOI2x6RRocdZLxB4I6zpOZrr2PtpgxUOuc2szdsQsmbgBYODdfPv 8+InsiKh48ltiSE71TMgFTBcrJ1cl11++AuxBSDhpsWrruEb0OM23T/Xx2/xpF89t6i5 LYq1wWdk1d4EidjYE2qLJbs0dZATqdzUyQWXWl+dqM0GLSZPYZDX0BGxmwYMevsjgxAb NQRpGE2AZ9Wdfi8GrkJ5B8c41UpdSL/+G4mOO/LMohv/p4j0n2uYi16O8ifLLh+hX9Qf Bcpg== X-Gm-Message-State: AOJu0YxGSnPPzIpeSX+lY8Dt8/1GsqzP650md3WWOyGRd3Rk/hrMNMCP 2EBviyOplSx71IScrBB7nPmYn27a/+8aVvwEQAI= X-Received: by 2002:a05:6a20:8421:b0:185:876f:4f4d with SMTP id c33-20020a056a20842100b00185876f4f4dmr8211221pzd.32.1700900532019; Sat, 25 Nov 2023 00:22:12 -0800 (PST) MIME-Version: 1.0 References: <20231125073738.649948-1-ghanshyam1898@gmail.com> <2023112554-bagginess-banker-089e@gregkh> In-Reply-To: <2023112554-bagginess-banker-089e@gregkh> From: Ghanshyam Agrawal Date: Sat, 25 Nov 2023 13:51:35 +0530 Message-ID: Subject: Re: [PATCH V3] media: stk1160: Fixed high volume of stk1160_dbg messages To: Greg KH Cc: ezequiel@vanguardiasur.com.ar, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Phillip Potter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 25 Nov 2023 00:22:23 -0800 (PST) On Sat, Nov 25, 2023 at 1:18=E2=80=AFPM Greg KH wrote: > > On Sat, Nov 25, 2023 at 01:07:38PM +0530, Ghanshyam Agrawal wrote: > > The function stk1160_dbg gets called too many times, which causes > > the output to get flooded with messages. Since stk1160_dbg uses > > printk, it is now replaced with printk_ratelimited directly. > > > > Suggested-by: Phillip Potter > > Signed-off-by: Ghanshyam Agrawal > > --- > > V3: > > Fixed the issue with my patch needing previous versions being applied > > first. > > > > Used printk_ratelimited instead of dev_warn_ratelimited because > > of compiler error "incompatible pointer type". > > > > V2: > > To add KERN_WARNING in printk_ratelimited, and later as per warning by > > the checkpatch script, replaced printk_ratelimited with > > dev_warn_ratelimited. > > > > V1: > > The function stk1160_dbg gets called too many times, which causes > > the output to get flooded with messages. Since stk1160_dbg uses > > printk, it is now replaced with dev_warn_ratelimited. > > > > drivers/media/usb/stk1160/stk1160-video.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/media/usb/stk1160/stk1160-video.c b/drivers/media/= usb/stk1160/stk1160-video.c > > index 4e966f6bf608..98417fa31d70 100644 > > --- a/drivers/media/usb/stk1160/stk1160-video.c > > +++ b/drivers/media/usb/stk1160/stk1160-video.c > > @@ -107,8 +107,7 @@ void stk1160_copy_video(struct stk1160 *dev, u8 *sr= c, int len) > > > > /* > > * TODO: These stk1160_dbg are very spammy! > > - * We should 1) check why we are getting them > > - * and 2) add ratelimit. > > + * We should check why we are getting them. > > * > > * UPDATE: One of the reasons (the only one?) for getting these > > * is incorrect standard (mismatch between expected and configure= d). > > @@ -151,7 +150,7 @@ void stk1160_copy_video(struct stk1160 *dev, u8 *sr= c, int len) > > > > /* Let the bug hunt begin! sanity checks! */ > > if (lencopy < 0) { > > - stk1160_dbg("copy skipped: negative lencopy\n"); > > + printk_ratelimited(KERN_WARNING "copy skipped: negative l= encopy\n"); > > You changed a debug message level to a KERN_WARNING level? That feels > like a step backwards. > > thanks, > > greg k-h Hi Greg, Thanks for your response. The log level should indeed be DEBUG as it was earlier. I only wanted to add a rate limit there because it was printing too many log messages as mentioned in the todo. Shall I update the log level to DEBUG and resend the patch? Thank you very much again. Regards, Ghanshyam Agrawal