linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Jonathan Cameron <jic23@kernel.org>
Cc: sakari.ailus@linux.intel.com, "Zhi Mao 毛智" <zhi.mao@mediatek.com>,
	"heiko@sntech.de" <heiko@sntech.de>,
	"tomi.valkeinen@ideasonboard.com"
	<tomi.valkeinen@ideasonboard.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"yunkec@chromium.org" <yunkec@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dan.scally@ideasonboard.com" <dan.scally@ideasonboard.com>,
	"gerald.loacker@wolfvision.net" <gerald.loacker@wolfvision.net>,
	"Shengnan Wang 王圣男" <shengnan.wang@mediatek.com>,
	"hdegoede@redhat.com" <hdegoede@redhat.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Yaya Chang 張雅清" <Yaya.Chang@mediatek.com>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"jacopo.mondi@ideasonboard.com" <jacopo.mondi@ideasonboard.com>,
	"jernej.skrabec@gmail.com" <jernej.skrabec@gmail.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"bingbu.cao@intel.com" <bingbu.cao@intel.com>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"10572168@qq.com" <10572168@qq.com>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"laurent.pinchart@ideasonboard.com"
	<laurent.pinchart@ideasonboard.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>,
	"macromorgan@hotmail.com" <macromorgan@hotmail.com>
Subject: Re: [PATCH v6 2/2] media: i2c: Add GC08A3 image sensor driver
Date: Wed, 28 Feb 2024 20:06:14 +0200	[thread overview]
Message-ID: <CAHp75Ve=gRhRMN-3JyEZ3EX3oU72buGhGTx6jukgwOzO=KRjNA@mail.gmail.com> (raw)
In-Reply-To: <170914163823.252503.15921889437591940623@ping.linuxembedded.co.uk>

On Wed, Feb 28, 2024 at 7:34 PM Kieran Bingham
<kieran.bingham@ideasonboard.com> wrote:
> Quoting Andy Shevchenko (2024-02-28 17:17:12)
> > On Wed, Feb 28, 2024 at 2:03 PM sakari.ailus@linux.intel.com
> > <sakari.ailus@linux.intel.com> wrote:
> > > On Wed, Feb 28, 2024 at 11:22:13AM +0200, Andy Shevchenko wrote:
> > > > > Another, I also reviewed some other sensor driver code(such as
> > > > > gc0a08/gc2145 and imx/ov), they are all the same.
> > > >
> > > > They are also problematic. So what?
> > >
> > > The situation is the same in a large number of drivers, also outside the
> > > media tree. It's also not trivial to figure out which header should be
> > > included and it tends to be that if it compiles without warnings,
> > > developers won't bother trying to figure out what should still be changed.
> >
> > I spent about 20 minutes reading the code. Yes, for inexperienced
> > developers it can take 3x longer, but still, much longer time was
> > spent on writing that code to begin with. So, the headers are a part
> > of the evolution of the code. And now it's pure technical debt with no
> > excuses to not fulfill.
> >
> > TL;DR: It's (rightfully) assumed that the developer *knows* their code.
> >
> > > I wonder if this could be automated by using the C preprocessor and a
> > > small Perl script. :-)
> >
> > There is a Google project coming from Clang people or so, but I have
> > no idea of the state of affairs.
>
> I've used iwyu (include-what-you-use) successfully on libcamera. But I
> don't know how this would translate to working on the kernel, with a
> more complex build system.

Jonathan tried that once. It needs to be heavily tweaked to be used in
the kernel project.

> But indeed, tooling already exists [0] to do these checks, and is packaged
> in distros [1]
>
> [0] https://include-what-you-use.org/
> [1] https://manpages.ubuntu.com/manpages/focal/man1/iwyu_tool.1.html

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2024-02-28 18:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27  1:32 [PATCH v6 0/2] media: i2c: Add support for GC08A3 sensor Zhi Mao
2024-02-27  1:32 ` [PATCH v6 1/2] media: dt-bindings: i2c: add GalaxyCore GC08A3 image sensor Zhi Mao
2024-02-27  1:32 ` [PATCH v6 2/2] media: i2c: Add GC08A3 image sensor driver Zhi Mao
2024-02-27 12:46   ` Andy Shevchenko
2024-02-27 13:26     ` Sakari Ailus
2024-02-28  3:19     ` Zhi Mao (毛智)
2024-02-28  9:22       ` Andy Shevchenko
2024-02-28 12:02         ` sakari.ailus
2024-02-28 17:17           ` Andy Shevchenko
2024-02-28 17:33             ` Kieran Bingham
2024-02-28 18:06               ` Andy Shevchenko [this message]
2024-03-03  2:46     ` Zhi Mao (毛智)

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='CAHp75Ve=gRhRMN-3JyEZ3EX3oU72buGhGTx6jukgwOzO=KRjNA@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=10572168@qq.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Yaya.Chang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bingbu.cao@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gerald.loacker@wolfvision.net \
    --cc=hdegoede@redhat.com \
    --cc=heiko@sntech.de \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jic23@kernel.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=macromorgan@hotmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shengnan.wang@mediatek.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=yunkec@chromium.org \
    --cc=zhi.mao@mediatek.com \
    /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;
as well as URLs for NNTP newsgroup(s).