Thread (10 messages) 10 messages, 3 authors, 2024-03-03

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

From: Andy Shevchenko <hidden>
Date: 2024-02-28 17:17:50
Also in: linux-devicetree, linux-media, linux-mediatek, lkml

On Wed, Feb 28, 2024 at 2:03 PM sakari.ailus@linux.intel.com
[off-list ref] wrote:
On Wed, Feb 28, 2024 at 11:22:13AM +0200, Andy Shevchenko wrote:
quoted
quoted
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.


-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help