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: <20250713151728.0a36e6a0@jic23-huawei>
Date: Sun, 13 Jul 2025 15:17:28 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Sean Nyekjaer <sean@...nix.com>
Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>, David Lechner
 <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy
 Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] iio: imu: inv_icm42600: Use
 inv_icm42600_disable_vddio_reg()

On Wed, 09 Jul 2025 14:35:09 +0200
Sean Nyekjaer <sean@...nix.com> wrote:

> Replace direct calls to regulator_disable() with the existing
> inv_icm42600_disable_vddio_reg() helper. This improves consistency
> and ensures any future changes to the disable logic are centralized.
> 
> Signed-off-by: Sean Nyekjaer <sean@...nix.com>

That function only exists to match type for the devm_ callback
at the cost of using type safety.  So I'm not sure loosing type
safety in more of the code is a good direction to go in.

> ---
>  drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
> index a4d42e7e21807f7954def431e9cf03dffaa5bd5e..69496d1c1ff73132f5e7bd076d18a62c293285a2 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
> @@ -892,7 +892,7 @@ static int inv_icm42600_suspend(struct device *dev)
>  
>  	/* disable vddio regulator if chip is sleeping */
>  	if (!wakeup)
> -		regulator_disable(st->vddio_supply);
> +		inv_icm42600_disable_vddio_reg(st);
>  
>  out_unlock:
>  	mutex_unlock(&st->lock);
> @@ -973,7 +973,7 @@ static int inv_icm42600_runtime_suspend(struct device *dev)
>  	if (ret)
>  		goto error_unlock;
>  
> -	regulator_disable(st->vddio_supply);
> +	inv_icm42600_disable_vddio_reg(st);
>  
>  error_unlock:
>  	mutex_unlock(&st->lock);
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ