From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Sakari Ailus" <sakari.ailus@linux.intel.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
linux-iio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 05/12] iio: dac: Remove redundant pm_runtime_mark_last_busy() calls
Date: Wed, 9 Jul 2025 16:49:33 +0100 [thread overview]
Message-ID: <20250709164933.47913e22@jic23-huawei> (raw)
In-Reply-To: <aG4sxEtXRw982Z9q@smile.fi.intel.com>
On Wed, 9 Jul 2025 11:48:04 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Wed, Jul 09, 2025 at 02:11:52AM +0300, Sakari Ailus wrote:
> > pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> > pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> > to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> > pm_runtime_mark_last_busy().
>
> ...
>
> > - if (!enable) {
> > - pm_runtime_mark_last_busy(dev);
> > + if (!enable)
> > pm_runtime_put_autosuspend(dev);
> > - }
> >
> > return 0;
> >
> > err_put_pm:
> > - if (enable) {
> > - pm_runtime_mark_last_busy(dev);
> > + if (enable)
> > pm_runtime_put_autosuspend(dev);
> > - }
> >
> > return ret;
>
>
> Hmm... Why not simply
>
> ret = 0;
It's already zero (as last call was a regmap_update_bits() return value ) so even easier.
However, switch if (ret < 0) to if (ret) for that regmap call
to make that more obvious.
>
> err_put_pm:
> if (enable)
> pm_runtime_put_autosuspend(dev);
>
> return ret;
>
> instead of the duplication?
>
prev parent reply other threads:[~2025-07-09 21:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250708231144.971170-1-sakari.ailus@linux.intel.com>
2025-07-08 23:11 ` [PATCH v2 02/12] iio: adc: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
2025-07-09 3:52 ` Chen-Yu Tsai
2025-07-09 15:37 ` Jonathan Cameron
2025-08-25 11:57 ` Sakari Ailus
2025-07-08 23:11 ` [PATCH v2 05/12] iio: dac: " Sakari Ailus
2025-07-09 8:48 ` Andy Shevchenko
2025-07-09 15:49 ` 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=20250709164933.47913e22@jic23-huawei \
--to=jic23@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=nuno.sa@analog.com \
--cc=sakari.ailus@linux.intel.com \
--cc=u.kleine-koenig@baylibre.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