public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Sean Nyekjaer <sean@geanix.com>
Cc: "Jean-Baptiste Maneyrol" <jean-baptiste.maneyrol@tdk.com>,
	rafael@kernel.org, "Jonathan Cameron" <jic23@kernel.org>,
	"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,
	linux-pm@vger.kernel.org,
	"Jean-Baptiste Maneyrol" <jmaneyrol@invensense.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v4 5/5] iio: imu: inv_icm42600: use guard() to release mutexes
Date: Tue, 9 Sep 2025 16:15:04 +0300	[thread overview]
Message-ID: <aMAoWPAvOmOfgfaR@smile.fi.intel.com> (raw)
In-Reply-To: <wl4fvd76hjf66k6pmkoce5wg5luspxjjsclxg5pdh7rjycarko@ovddl55mn77l>

On Tue, Sep 09, 2025 at 11:53:02AM +0000, Sean Nyekjaer wrote:
> On Tue, Sep 09, 2025 at 02:39:12PM +0100, Andy Shevchenko wrote:
> > On Tue, Sep 09, 2025 at 09:11:11AM +0200, Sean Nyekjaer wrote:

...

> > >  	/* exit if FIFO is already on */
> > >  	if (st->fifo.on) {
> > > -		ret = 0;
> > > -		goto out_on;
> > 
> > Probably you wanted the same comment here
> > 
> > 	/* increase FIFO on counter */
> > 
> > > +		st->fifo.on++;
> > > +		return 0;
> > >  	}

...

> > >  	/* exit if there are several sensors using the FIFO */
> > >  	if (st->fifo.on > 1) {
> > > -		ret = 0;
> > > -		goto out_off;
> > 
> > In the similar way
> > 
> 
> Considered it. But isn't it obvious whats happening?

With the same equality existing ones may be killed. Some of consistency at least :-)

> I will be happy to add them...

> > 	/* decrease FIFO on counter */
> > 
> > > +		st->fifo.on--;
> > > +		return 0;
> > >  	}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-09-09 13:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09  7:11 [PATCH v4 0/5] iio: imu: inv_icm42600: pm_runtime fixes + various changes Sean Nyekjaer
2025-09-09  7:11 ` [PATCH v4 1/5] iio: imu: inv_icm42600: Simplify pm_runtime setup Sean Nyekjaer
2025-09-09  7:11 ` [PATCH v4 2/5] iio: imu: inv_icm42600: Drop redundant pm_runtime reinitialization in resume Sean Nyekjaer
2025-09-09  7:11 ` [PATCH v4 3/5] iio: imu: inv_icm42600: Avoid configuring if already pm_runtime suspended Sean Nyekjaer
2025-09-09  7:11 ` [PATCH v4 4/5] iio: imu: inv_icm42600: Use devm_regulator_get_enable() for vdd regulator Sean Nyekjaer
2025-09-09  7:11 ` [PATCH v4 5/5] iio: imu: inv_icm42600: use guard() to release mutexes Sean Nyekjaer
2025-09-09 11:39   ` Andy Shevchenko
2025-09-09 11:53     ` Sean Nyekjaer
2025-09-09 13:15       ` Andy Shevchenko [this message]
2025-09-10 18:36         ` Jonathan Cameron
2025-09-09 14:03   ` David Lechner

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=aMAoWPAvOmOfgfaR@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jean-baptiste.maneyrol@tdk.com \
    --cc=jic23@kernel.org \
    --cc=jmaneyrol@invensense.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=rafael@kernel.org \
    --cc=sean@geanix.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