From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6A58C4345F for ; Thu, 18 Apr 2024 14:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wuIEjXW0cLg16RPwjs+mWRgdhdGcaAE+PQec4QsmbDU=; b=2NkPSMOV8Ggjqe BtKSwcsUFyYCkvg79JPFP72AGvZRz07Ccj5iweKew3x98AQNEHEIydB676g0p1Po4wqI4GhwUHbEE IjIlxJaKdfSO12tfrkOJnozLVAh6Gg7mh28Pwm4cKodx1nv/8VaIm8sBTK07wOYdZvtbLTU0vhgoO N8kLvhX5PSZDsaU3gxCnspe1ATImb8fNQgzABQgmpmhC6IdYGKvowkr6u9S5UxW/zM1Xl3FTkwmbX xWPyCgvdOTpuEpBMeGLXXMPfXcxcoEib3MhhrQyTghJpqDcDnmd84XAUS8mDnTEDyCW5h175W3Tp+ XKg/9oXdbNHsk2SsL/rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxT76-00000002hI1-489F; Thu, 18 Apr 2024 14:51:49 +0000 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxT73-00000002hGn-1Tv3 for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2024 14:51:46 +0000 Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-47bb81424adso454979137.1 for ; Thu, 18 Apr 2024 07:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713451903; x=1714056703; darn=lists.infradead.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oMqAEiiN7av4J6wM+O4afdcaiaOjYq8V1FKf5PLPclI=; b=MrCv16SnIGqfPSlC3DCxvpdqTu4+L2g53fvcvgQeDw6iJTdJ730BR6JZ4eAQRdiX7H u5T3LH2inTj04xlOMM+zAC/dYF7PWKLnOvzsjMk2YBTRgAPPMx9Qky+GGaGWK4AeH92N XoV9ICcBRZAzf98Q4/1WO8fXwHly3u0PBKzjs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713451903; x=1714056703; h=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=oMqAEiiN7av4J6wM+O4afdcaiaOjYq8V1FKf5PLPclI=; b=ieSyVBgyWD/gPMQgIWHAow7hviypte8cxE1KIZ8kA3SCWBnV0xHcfco9gOy1Afro2H WyXuG9GmFQ3k1PZLJm5I3Ndt0dBfn0f7SBoohe+z9mqyNu+diQ5qD1jqZp4ryemr7Nx8 XBYffVTGSdS5BtyBs+TSaREmWQHqPGGTbs0yNBgva5AY1XbsIZlxmbOs1Y5F0eMPXMKm eIh0U4AKowDlNfPKqNzi8OBsbD1ZTO2gSHLZYn+x2tnmt293CVNXcB05eETQon/89DD8 99kB4ZW+0QZob5bsH8A4p/1pu/SgdIOBuhajTuvp6qFwHKKEgnlRTalgl4KpEqheeNdL 8SDg== X-Forwarded-Encrypted: i=1; AJvYcCW/D+klSbB7MTkzhhEuv5JjFqIHeU6+FIDCCEKfQOglNsO7oR9HrEBwXGY6VGST56ZfM0z3sOXxOoZqmO0s5KU//aDxVzfhvmLS0L0aVq5rxVVwlv0= X-Gm-Message-State: AOJu0YwyUNIE/KwnAQVi8+R2zaoQ72Y9vSTRT8LXLpdWbBfoKnqij8S2 xpeTLWw22LWMjsmTobPhxlGX6+KXtiet5VBX5Ac+24mn+4Koq7J1NXP0ij2Zm3UDW1DJ96CHhio = X-Google-Smtp-Source: AGHT+IG3259xNgi5cOp/ZcTu4MIOFAoQStZy7hglHDzZJj9J2tmyPANJcuxdpHcWfrIITIH/5vZ+Yg== X-Received: by 2002:a05:6102:2909:b0:47b:b517:74aa with SMTP id cz9-20020a056102290900b0047bb51774aamr3649050vsb.10.1713451903673; Thu, 18 Apr 2024 07:51:43 -0700 (PDT) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id hw10-20020a67e70a000000b0047bc0c4ee70sm96116vsb.31.2024.04.18.07.51.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Apr 2024 07:51:43 -0700 (PDT) Received: by mail-ua1-f50.google.com with SMTP id a1e0cc1a2514c-7ec48a0306bso74466241.0 for ; Thu, 18 Apr 2024 07:51:43 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXMYKkjDeuDU61HPtb3h5XeYTHp1QeTX7M7flTyjzIt+WxHibg+ZN7qhTf8uGKfydPQrRa/QKpMVOH7uJufHaojbsv0qJzdHejzw+WQzTNEpI/wbAM= X-Received: by 2002:a05:6214:4a5b:b0:6a0:4571:e0c8 with SMTP id ph27-20020a0562144a5b00b006a04571e0c8mr3999896qvb.18.1713451882078; Thu, 18 Apr 2024 07:51:22 -0700 (PDT) MIME-Version: 1.0 References: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> <20240417155112.GQ12561@pendragon.ideasonboard.com> <20240418105310.GV12561@pendragon.ideasonboard.com> In-Reply-To: <20240418105310.GV12561@pendragon.ideasonboard.com> From: Ricardo Ribalda Date: Thu, 18 Apr 2024 16:51:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/35] media: Fix coccinelle warning/errors To: Laurent Pinchart Cc: Dan Carpenter , Martin Tuma , Mauro Carvalho Chehab , Hans Verkuil , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Stanimir Varbanov , Vikash Garodia , "Bryan O'Donoghue" , Bjorn Andersson , Konrad Dybcio , Benjamin Mugnier , Sylvain Petinot , Jacopo Mondi , Kieran Bingham , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Pavel Machek , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Oleg Drokin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240418_075145_441704_F972DEFF X-CRM114-Status: GOOD ( 40.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Laurent On Thu, 18 Apr 2024 at 12:53, Laurent Pinchart wrote: > > Hi Ricardo, > > On Wed, Apr 17, 2024 at 06:19:14PM +0200, Ricardo Ribalda wrote: > > On Wed, 17 Apr 2024 at 17:51, Laurent Pinchart wrote: > > > On Tue, Apr 16, 2024 at 11:47:17AM +0300, Dan Carpenter wrote: > > > > In my opinion, it's better to just ignore old warnings. > > > > > > I agree. Whatever checkers we enable, whatever code we test, there will > > > always be false positives. A CI system needs to be able to ignore those > > > false positives and only warn about new issues. > > > > We already have support for that: > > https://gitlab.freedesktop.org/linux-media/media-ci/-/tree/main/testdata/static?ref_type=heads > > Those are manually written filters. Would it be possible to reduce the > manual step to flagging something as a false positive, and have a > machine build the filters ? > Do you expect that the list of exceptions will grow? I hope that once the CI is in place we will fix the warnings before they land in the tree. > > But it would be great if those lists were as small as possible: > > > > - If we have a lot of warnings, two error messages can be combined and > > will scape the filters > > eg: > > print(AAAA); > > print(BBBB); > > > AABBBAAB > > > > - The filters might hide new errors if they are too broad > > > > > > Most of the patches in this series are simple and make a nicer code: > > Eg the non return minmax() , > > Other patches show real integer overflows. > > > > Now that the patches are ready, let's bite the bullet and try to > > reduce our technical debt. > > > > > > When code is new the warnings are going to be mostly correct. The > > > > original author is there and knows what the code does. Someone has > > > > the hardware ready to test any changes. High value, low burden. > > > > > > > > When the code is old only the false positives are left. No one is > > > > testing the code. It's low value, high burden. > > > > > > > > Plus it puts static checker authors in a difficult place because now > > > > people have to work around our mistakes. It creates animosity. > > > > > > > > Now we have to hold ourselves to a much higher standard for false > > > > positives. It sounds like I'm complaining and lazy, right? But Oleg > > > > Drokin has told me previously that I spend too much time trying to > > > > silence false positives instead of working on new code. He's has a > > > > point which is that actually we have limited amount of time and we have > > > > to make choices about what's the most useful thing we can do. > > > > > > > > So what I do and what the zero day bot does is we look at warnings one > > > > time and we re-review old warnings whenever a file is changed. > > > > > > > > Kernel developers are very good at addressing static checker warnings > > > > and fixing the real issues... People sometimes ask me to create a > > > > database of warnings which I have reviewed but the answer is that > > > > anything old can be ignored. As I write this, I've had a thought that > > > > instead of a database of false positives maybe we should record a > > > > database of real bugs to ensure that the fixes for anything real is > > > > applied. > > -- > Regards, > > Laurent Pinchart -- Ricardo Ribalda _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel