[PATCH v6 2/2] media: i2c: Add GC08A3 image sensor driver

sakari.ailus at linux.intel.com sakari.ailus at linux.intel.com
Wed Feb 28 04:02:59 PST 2024


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



More information about the linux-arm-kernel mailing list