[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aG4sxEtXRw982Z9q@smile.fi.intel.com>
Date: Wed, 9 Jul 2025 11:48:04 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
linux-iio@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 05/12] iio: dac: Remove redundant
pm_runtime_mark_last_busy() calls
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;
err_put_pm:
if (enable)
pm_runtime_put_autosuspend(dev);
return ret;
instead of the duplication?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists