The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iio: light: opt3001: split opt3001_get_processed() logic
Date: Mon, 13 Jul 2026 02:04:57 +0100	[thread overview]
Message-ID: <20260713020457.242e3f40@jic23-huawei> (raw)
In-Reply-To: <20260712183825.1f3dcf30@systembl0wer>

> 
> > > +	if (ret < 0) {
> > > +		dev_err(dev, "failed to write register %02x\n",
> > > +			OPT3001_LOW_LIMIT);
> > > +		return ret;
> > >  	}
> > >  
> > > +	return 0;    
> > 
> > Also can be simply
> > 
> > 	return ret;
> > 
> > in both branches.  
> 
> Yeah, I agonized over this since I did the change you describe in a
> different patchset, and I was advised to do it the way as I did in
> this patch so that it's more readable (i.e. we know which path is
> the successful one). I'm really indifferent to either change and it
> doesn't cut that many lines.
> 

This one is a case that tends to split reviewers.  I don't personally
care much either way because as you say the code saving is minor (but
good) vs it is a tiny bit fiddlier to read.

So far as I'm concerned either is fine.  Andy asked though so go
with that :)

J


      reply	other threads:[~2026-07-13  1:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 10:32 [PATCH v3] iio: light: opt3001: split opt3001_get_processed() logic Joshua Crofts
2026-07-12 13:58 ` Andy Shevchenko
2026-07-12 16:38   ` Joshua Crofts
2026-07-13  1:04     ` Jonathan Cameron [this message]

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=20260713020457.242e3f40@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=joshua.crofts1@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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