mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.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 0/5] iio: remove redundant else after return
Date: Sun, 22 Feb 2026 16:43:56 +0000	[thread overview]
Message-ID: <20260222164356.18721d31@jic23-huawei> (raw)
In-Reply-To: <aZhsCm4W5ZjLHh0J@smile.fi.intel.com>

On Fri, 20 Feb 2026 16:13:30 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Fri, Feb 20, 2026 at 03:33:29PM +0200, Antoniu Miclaus wrote:
> > Remove redundant else branches after return statements across several
> > IIO drivers (ad7298, ad7606, ad5592r, ad5758, admv8818) to simplify
> > control flow.  
> 
> While technically you are correct, the only patch 5 makes sense to me.
> The rest might be better with 'else' be present. It depends on the logic
> between the lines, if they are of the same semantics and it's not about
> returning error code vs. 0 (success), it may be better to read them
> if they are started on the same column.

I agree.  When it's a choice between two 'good' paths and the author
felt if / else made that choice aspect clear than I've always taken the
view that that is reasonable.

So I've picked up patch 5 but not the others.  5 was a little stronger as
it's if (A) do something else do nothing.

> 
> TL;DR: I am not going to NAK, but patches 1-4 is an unneeded churn to me.
> 


      parent reply	other threads:[~2026-02-22 16:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20 13:33 Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 1/5] iio: adc: ad7298: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 2/5] iio: adc: ad7606: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 3/5] iio: dac: ad5592r-base: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 4/5] iio: dac: ad5758: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 5/5] iio: filter: admv8818: " Antoniu Miclaus
2026-02-20 14:14   ` Andy Shevchenko
2026-02-20 14:13 ` [PATCH 0/5] iio: " Andy Shevchenko
2026-02-20 14:16   ` Andy Shevchenko
2026-02-22 16:43   ` 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=20260222164356.18721d31@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=lars@metafoo.de \
    --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

all inboxes | Powered by JetHome®