public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tianshu Qiu <tian.shu.qiu@intel.com>,
	Shawn Tu <shawnx.tu@intel.com>, Bingbu Cao <bingbu.cao@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH v1 2/8] media: ov2740: Replace voodoo coding with understandle flow
Date: Fri, 11 Nov 2022 17:30:09 +0200	[thread overview]
Message-ID: <Y25qgYsQNEGVTKeS@smile.fi.intel.com> (raw)
In-Reply-To: <Y25j/rJWSYI1eT1E@valkosipuli.retiisi.eu>

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?

> 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?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-11-11 15:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 12:05 [PATCH v1 1/8] media: ov2740: Remove duplicative pointer in struct nvm_data Andy Shevchenko
2022-07-26 12:05 ` [PATCH v1 2/8] media: ov2740: Replace voodoo coding with understandle flow Andy Shevchenko
2022-07-27  9:52   ` Cao, Bingbu
2022-11-11 15:02   ` Sakari Ailus
2022-11-11 15:30     ` Andy Shevchenko [this message]
2022-11-11 19:46       ` Sakari Ailus
2022-07-26 12:05 ` [PATCH v1 3/8] media: ov2740: Switch from __maybe_unused to pm_sleep_ptr() etc Andy Shevchenko
2022-07-26 12:05 ` [PATCH v1 4/8] media: ov2740: Remove duplicate check for NULL fwnode Andy Shevchenko
2022-07-27  9:41   ` Cao, Bingbu
2022-07-27 10:01   ` Cao, Bingbu
2022-07-26 12:05 ` [PATCH v1 5/8] media: ov2740: Drop redundant assignments of ret = 0 Andy Shevchenko
2022-07-26 12:05 ` [PATCH v1 6/8] media: ov2740: Switch to use dev_err_probe() Andy Shevchenko
2022-07-27 10:06   ` Cao, Bingbu
2022-07-26 12:05 ` [PATCH v1 7/8] media: ov2740: Add missed \n to the end of the messages Andy Shevchenko
2022-07-27 10:01   ` Cao, Bingbu
2022-07-26 12:05 ` [PATCH v1 8/8] media: ov2740: Use traditional pattern when checking error codes Andy Shevchenko
2022-08-23 14:10 ` [PATCH v1 1/8] media: ov2740: Remove duplicative pointer in struct nvm_data Andy Shevchenko
2022-11-11 12:05   ` Andy Shevchenko
2022-11-11 12:08     ` Andy Shevchenko
2022-11-11 14:58       ` Sakari Ailus
2022-11-11 15:29         ` Andy Shevchenko
2022-11-11 19:41           ` Sakari Ailus
2022-11-11 19:47             ` Andy Shevchenko

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=Y25qgYsQNEGVTKeS@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    --cc=shawnx.tu@intel.com \
    --cc=tian.shu.qiu@intel.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