From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47DEC15D5C1; Thu, 18 Apr 2024 10:53:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713437602; cv=none; b=Q/vFqW0iUQ+wCW/qEpvmynOc8+nDRlB9FG999dbtFUdD0E+KGsgENpbFZOkVzJOGM3Js+RiEOdgJUfYSCrL6oH4MvMc4sxen3uD7WrE4ZH98B4Fd122RWkhq0eLU24Xu4dhXrm6cWMYlgyOhTBdyOYREz7BB1LzOGitZ3ehmt+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713437602; c=relaxed/simple; bh=y44ptJ3mDFUWxmkBcurUdX8DIYAovhjAxSbpW9R/eNQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jBvX7QokVICKIa9GvRbG85F3P2lclry895nFjdGP8RgYW00b8vFIl8ZqtkVdyVAuEOakeeFfncsJQDPV2SyM1b2Q7QyKCKTCTNqcVfU2Z8e75DehNcEZk+dQ9q3qeA4dkGN2zGAbkUfqoZ1W3IlX0IPUVkHZA5HxoJdYHI2ZfY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=M6E1BxnR; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="M6E1BxnR" Received: from pendragon.ideasonboard.com (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B9034827; Thu, 18 Apr 2024 12:52:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1713437549; bh=y44ptJ3mDFUWxmkBcurUdX8DIYAovhjAxSbpW9R/eNQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M6E1BxnRdcjsS4JSj03zg7VJHuDZPXJ+ccXs0PNg0Q6+F9PZypIPKnmHsM7+MY+QG i4OWslc7wfgQ8vqT7fK1OBDEdeUb+3KXLPbYZy4/Py4vKtQ7bl65D6tTnVXUuYzsgG Q/FjedEb+g0AcsE72tr78ry7U9NTypqT9lt5kX70= Date: Thu, 18 Apr 2024 13:53:10 +0300 From: Laurent Pinchart To: Ricardo Ribalda 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 , Niklas =?utf-8?Q?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 Subject: Re: [PATCH 00/35] media: Fix coccinelle warning/errors Message-ID: <20240418105310.GV12561@pendragon.ideasonboard.com> References: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> <20240417155112.GQ12561@pendragon.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 ? > 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