[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zd8g81wBXyfMvPhB@kekkonen.localdomain>
Date: Wed, 28 Feb 2024 12:02:59 +0000
From: "sakari.ailus@...ux.intel.com" <sakari.ailus@...ux.intel.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Zhi Mao (毛智) <zhi.mao@...iatek.com>,
"heiko@...ech.de" <heiko@...ech.de>,
"tomi.valkeinen@...asonboard.com" <tomi.valkeinen@...asonboard.com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"yunkec@...omium.org" <yunkec@...omium.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dan.scally@...asonboard.com" <dan.scally@...asonboard.com>,
"gerald.loacker@...fvision.net" <gerald.loacker@...fvision.net>,
Shengnan Wang (王圣男) <shengnan.wang@...iatek.com>,
"hdegoede@...hat.com" <hdegoede@...hat.com>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
Yaya Chang (張雅清) <Yaya.Chang@...iatek.com>,
"mchehab@...nel.org" <mchehab@...nel.org>,
"jacopo.mondi@...asonboard.com" <jacopo.mondi@...asonboard.com>,
"jernej.skrabec@...il.com" <jernej.skrabec@...il.com>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
"bingbu.cao@...el.com" <bingbu.cao@...el.com>,
Project_Global_Chrome_Upstream_Group <Project_Global_Chrome_Upstream_Group@...iatek.com>,
"10572168@...com" <10572168@...com>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>,
"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"laurent.pinchart@...asonboard.com" <laurent.pinchart@...asonboard.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"angelogioacchino.delregno@...labora.com" <angelogioacchino.delregno@...labora.com>,
"macromorgan@...mail.com" <macromorgan@...mail.com>
Subject: Re: [PATCH v6 2/2] media: i2c: Add GC08A3 image sensor driver
Hi Andy, Zhi,
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 wonder if this could be automated by using the C pre-processor and a
small Perl script. :-)
> > Can we keep this coding style and follow with most of those
> > image sensor driver?
>
> Why? We do NOT want to continue developers to avoid decreasing their
> technical debts.
I agree. People tend to copy the code from existing drivers and argue "it's
just a driver, why bother?". That code will be soon found in a dozen other
new driver patchsets and every time must brought up in review and fixed,
leading to extra work for reviewers and developers. We've had quite a lot
of work improving the current (sensor etc.) drivers and fixing up the use
of bad patterns but this area has so far received little attention.
--
Regards,
Sakari Ailus
Powered by blists - more mailing lists