lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250704100508.00003d3a@huawei.com>
Date: Fri, 4 Jul 2025 10:05:08 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.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>, Waqar Hameed <waqar.hameed@...s.com>,
	Julien Stephan <jstephan@...libre.com>, Peter Zijlstra
	<peterz@...radead.org>, Bo Liu <liubo03@...pur.com>, Greg KH
	<gregkh@...uxfoundation.org>, Al Viro <viro@...iv.linux.org.uk>, "Sean
 Nyekjaer" <sean@...nix.com>, Marcelo Schmitt <marcelo.schmitt1@...il.com>,
	Rayyan Ansari <rayyan@...ari.sh>, Francisco Henriques
	<franciscolealhenriques@....br>, Matti Vaittinen <mazziesaccount@...il.com>,
	<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 27/80] iio: accel: Remove redundant
 pm_runtime_mark_last_busy() calls

On Fri,  4 Jul 2025 10:54:18 +0300
Sakari Ailus <sakari.ailus@...ux.intel.com> 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().
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
> 
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
> 
>         git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>                 pm-runtime-6.17-rc1
> 
>  drivers/iio/accel/bmc150-accel-core.c | 1 -
>  drivers/iio/accel/bmi088-accel-core.c | 3 ---
>  drivers/iio/accel/fxls8962af-core.c   | 1 -
>  drivers/iio/accel/kxcjk-1013.c        | 1 -
>  drivers/iio/accel/kxsd9.c             | 3 ---
>  drivers/iio/accel/mma8452.c           | 1 -
>  drivers/iio/accel/mma9551_core.c      | 1 -
>  drivers/iio/accel/msa311.c            | 6 ------
>  8 files changed, 17 deletions(-)
> 
> diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> index be5fbb0c5d29..f45beae83f8b 100644
> --- a/drivers/iio/accel/bmc150-accel-core.c
> +++ b/drivers/iio/accel/bmc150-accel-core.c
> @@ -335,7 +335,6 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
>  	if (on) {
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
> -		pm_runtime_mark_last_busy(dev);
>  		ret = pm_runtime_put_autosuspend(dev);
>  	}

See kernel coding style.  The drop to one line in each leg means we should drop the {}


> diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
> index 12598feaa693..8afd151c03ad 100644
> --- a/drivers/iio/accel/fxls8962af-core.c
> +++ b/drivers/iio/accel/fxls8962af-core.c
> @@ -222,7 +222,6 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
>  	struct device *dev = regmap_get_device(data->regmap);
>  	int ret;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	ret = pm_runtime_put_autosuspend(dev);
>  	if (ret)
>  		dev_err(dev, "failed to power off\n");
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index 6aefe8221296..44d770729186 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -637,7 +637,6 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
>  	if (on)
>  		ret = pm_runtime_resume_and_get(&data->client->dev);
>  	else {
> -		pm_runtime_mark_last_busy(&data->client->dev);

Likewise here.

>  		ret = pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  	if (ret < 0) {


> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index aba444a980d9..5863478bab62 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -227,7 +227,6 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
>  	if (on) {
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  	} else {
> -		pm_runtime_mark_last_busy(&client->dev);

And here.

>  		ret = pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
> diff --git a/drivers/iio/accel/mma9551_core.c b/drivers/iio/accel/mma9551_core.c
> index 3e7d9b79ed0e..22768f43fd24 100644
> --- a/drivers/iio/accel/mma9551_core.c
> +++ b/drivers/iio/accel/mma9551_core.c
> @@ -672,7 +672,6 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
>  	if (on)
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  	else {
> -		pm_runtime_mark_last_busy(&client->dev);
And here...

>  		ret = pm_runtime_put_autosuspend(&client->dev);
>  	}



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ