[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2022 21:46:22 +0200
From: Sakari Ailus <sakari.ailus@....fi>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Tianshu Qiu <tian.shu.qiu@...el.com>,
Shawn Tu <shawnx.tu@...el.com>,
Bingbu Cao <bingbu.cao@...el.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: [PATCH v1 2/8] media: ov2740: Replace voodoo coding with
understandle flow
On Fri, Nov 11, 2022 at 05:30:09PM +0200, Andy Shevchenko wrote:
> On Fri, Nov 11, 2022 at 05:02:22PM +0200, Sakari Ailus wrote:
> > Hi Andy,
> >
> > On Tue, Jul 26, 2022 at 03:05:50PM +0300, Andy Shevchenko wrote:
> > > Besides not being understandable at the first glance, the code
> > > might provoke a compiler or a static analyser tool to warn about
> > > out-of-bound access (when len == 0).
> >
> > I've never seen one.
> >
> > However the same pattern is repeatedly used by many, many drivers and
> > addressing just one doesn't make much sense.
> >
> > The proper way to fix this would be to have a set of common CCI (Camera
> > Control Interface) functions that all drivers could use, and then switch
> > the drivers to use them.
> >
> > This isn't currently a great fit for e.g. regmap but perhaps something
> > light on top of regmap-i2c could do the trick?
>
> So, then we can skip this one, right?
Yes.
>
> > The rest of the set seems good to me.
>
> Thank you for the review, can you apply them, or should I send a v2 with
> dropped first patch?
Already done. I'm still doing more testing before pushing.
Thanks!
--
Sakari Ailus
Powered by blists - more mailing lists