public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: "Dan Carpenter" <dan.carpenter@linaro.org>,
	"Martin Tuma" <martin.tuma@digiteqautomotive.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	"Hugues Fruchet" <hugues.fruchet@foss.st.com>,
	"Alain Volmat" <alain.volmat@foss.st.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Paul Kocialkowski" <paul.kocialkowski@bootlin.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Sowjanya Komatineni" <skomatineni@nvidia.com>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Sergey Kozlov" <serjk@netup.ru>,
	"Abylay Ospan" <aospan@netup.ru>,
	"Ezequiel Garcia" <ezequiel@vanguardiasur.com.ar>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Stanimir Varbanov" <stanimir.k.varbanov@gmail.com>,
	"Vikash Garodia" <quic_vgarodia@quicinc.com>,
	"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
	"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
	"Jacopo Mondi" <jacopo+renesas@jmondi.org>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Pavel Machek" <pavel@ucw.cz>,
	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" <green@linuxhacker.ru>
Subject: Re: [PATCH 00/35] media: Fix coccinelle warning/errors
Date: Thu, 18 Apr 2024 18:46:33 +0300	[thread overview]
Message-ID: <20240418154633.GD31776@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CANiDSCuS3KQK9H37sDZJ+mcqheNSh7NBwchS3dPccVXcPTSNRA@mail.gmail.com>

Hi Ricardo,

On Thu, Apr 18, 2024 at 04:51:06PM +0200, Ricardo Ribalda wrote:
> On Thu, 18 Apr 2024 at 12:53, Laurent Pinchart wrote:
> > 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.

Any static checker is bound to produce false positives. Some of them can
be addressed by improving the checker, others by modifying the source
code, but in some cases the first option would be too difficult and the
second would reduce readability of the code. I thus thing the list of
accepted false positives will grow over time.

> > > 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

      reply	other threads:[~2024-04-18 15:46 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 19:34 [PATCH 00/35] media: Fix coccinelle warning/errors Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 01/35] media: pci: mgb4: Refactor struct resources Ricardo Ribalda
2024-04-16 11:30   ` Martin Tůma
2024-04-15 19:34 ` [PATCH 02/35] media: stb0899: Remove unreacheable code Ricardo Ribalda
2024-04-16  7:32   ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 03/35] media: uvcvideo: Refactor iterators Ricardo Ribalda
2024-04-16  4:39   ` Sergey Senozhatsky
2024-04-16  5:08     ` Sergey Senozhatsky
2024-04-16  7:03   ` Markus Elfring
2024-04-16  7:15     ` Greg Kroah-Hartman
2024-04-18 11:04   ` Laurent Pinchart
2024-04-15 19:34 ` [PATCH 04/35] media: uvcvideo: Use max() macro Ricardo Ribalda
2024-04-15 21:06   ` Kieran Bingham
2024-04-16  4:41   ` Sergey Senozhatsky
2024-04-18 10:54   ` Laurent Pinchart
2024-04-15 19:34 ` [PATCH 05/35] media: go7007: Use min and max macros Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 06/35] media: stm32-dcmipp: Remove redundant printk Ricardo Ribalda
2024-04-16  7:30   ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 07/35] media: staging: sun6i-isp: " Ricardo Ribalda
2024-04-15 20:43   ` Jernej Škrabec
2024-04-16  7:37   ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 08/35] media: dvb-frontends: tda18271c2dd: Remove casting during div Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 09/35] media: v4l: async: refactor v4l2_async_create_ancillary_links Ricardo Ribalda
2024-04-16  7:44   ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 10/35] staging: media: tegra-video: Use swap macro Ricardo Ribalda
2024-04-16  2:03   ` Luca Ceresoli
2024-04-15 19:34 ` [PATCH 11/35] media: s2255: Use refcount_t instead of atomic_t for num_channels Ricardo Ribalda
2024-04-23 12:43   ` Bryan O'Donoghue
2024-04-23 13:22     ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 12/35] media: platform: mtk-mdp3: Use refcount_t for job_count Ricardo Ribalda
2024-04-23 12:46   ` Bryan O'Donoghue
2024-04-15 19:34 ` [PATCH 13/35] media: common: saa7146: Use min macro Ricardo Ribalda
2024-04-23 12:49   ` Bryan O'Donoghue
2024-04-15 19:34 ` [PATCH 14/35] media: dvb-frontends: drx39xyj: " Ricardo Ribalda
2024-04-23 16:40   ` Bryan O'Donoghue
2024-04-15 19:34 ` [PATCH 15/35] media: netup_unidvb: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 16/35] media: au0828: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 17/35] media: flexcop-usb: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 18/35] media: gspca: cpia1: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 19/35] media: stk1160: " Ricardo Ribalda
2024-04-23 16:42   ` Bryan O'Donoghue
2024-04-15 19:34 ` [PATCH 20/35] media: tegra-vde: Refactor timeout handling Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 21/35] media: venus: Use div64_u64 Ricardo Ribalda
2024-04-16  7:57   ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 22/35] media: i2c: st-mipid02: Use the correct div function Ricardo Ribalda
2024-04-17 12:55   ` Benjamin Mugnier
2024-04-15 19:34 ` [PATCH 23/35] media: dvb-frontends: tda10048: Use the right div Ricardo Ribalda
2024-04-16 10:10   ` Dan Carpenter
2024-04-16 10:27     ` Dan Carpenter
2024-04-23  9:55       ` Dan Carpenter
2024-04-29 11:39         ` Ricardo Ribalda
2024-04-16 10:39     ` Ricardo Ribalda
2024-04-16 10:56       ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 24/35] media: tc358746: Use the correct div_ function Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 25/35] media: venus: " Ricardo Ribalda
2024-04-17  8:36   ` Dan Carpenter
2024-04-15 19:34 ` [PATCH 26/35] media: venus: Refator return path Ricardo Ribalda
2024-04-23 16:49   ` Bryan O'Donoghue
2024-04-15 19:34 ` [PATCH 27/35] media: dib0700: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 28/35] media: usb: cx231xx: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 29/35] media: i2c: rdacm20: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 30/35] media: i2c: et8ek8: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 31/35] media: cx231xx: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 32/35] media: si4713: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 33/35] media: ttpci: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 34/35] media: hdpvr: " Ricardo Ribalda
2024-04-15 19:34 ` [PATCH 35/35] media: venus: " Ricardo Ribalda
2024-04-15 19:53 ` [PATCH 00/35] media: Fix coccinelle warning/errors Laurent Pinchart
2024-04-15 19:58   ` Ricardo Ribalda
2024-04-15 20:33     ` Niklas Söderlund
2024-04-15 21:16       ` Ricardo Ribalda
2024-04-15 21:38         ` Niklas Söderlund
2024-04-16  7:08           ` Laurent Pinchart
2024-04-16  7:59             ` Julia Lawall
2024-04-16  8:47 ` Dan Carpenter
2024-04-17 15:51   ` Laurent Pinchart
2024-04-17 16:19     ` Ricardo Ribalda
2024-04-18 10:53       ` Laurent Pinchart
2024-04-18 14:51         ` Ricardo Ribalda
2024-04-18 15:46           ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240418154633.GD31776@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=aospan@netup.ru \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dan.carpenter@linaro.org \
    --cc=digetx@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=green@linuxhacker.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=hugues.fruchet@foss.st.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo+renesas@jmondi.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=martin.tuma@digiteqautomotive.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=pavel@ucw.cz \
    --cc=quic_vgarodia@quicinc.com \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=samuel@sholland.org \
    --cc=serjk@netup.ru \
    --cc=skomatineni@nvidia.com \
    --cc=stanimir.k.varbanov@gmail.com \
    --cc=sylvain.petinot@foss.st.com \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox