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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250713152200.041e05dd@jic23-huawei>
Date: Sun, 13 Jul 2025 15:22:00 +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 3/6] iio: imu: inv_icm42600: Remove redundant error msg
 on regulator_disable()

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

> The regulator framework already emits an error message when
> regulator_disable() fails, making the local dev_err() redundant.
> Remove the duplicate message to avoid cluttering the kernel log
> with the same error twice.
> 
> Signed-off-by: Sean Nyekjaer <sean@...nix.com>
> ---
>  drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
> index 35f7c66d77790829a739d2c54ba77e53903a9297..55a29b1e2b11355598b0ede7af22857aed3ae134 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
> @@ -700,12 +700,8 @@ static int inv_icm42600_enable_regulator_vddio(struct inv_icm42600_state *st)
>  static void inv_icm42600_disable_vddio_reg(void *_data)
>  {
>  	struct inv_icm42600_state *st = _data;
> -	const struct device *dev = regmap_get_device(st->map);
> -	int ret;
>  
> -	ret = regulator_disable(st->vddio_supply);
> -	if (ret)
> -		dev_err(dev, "failed to disable vddio error %d\n", ret);

Dropping this message (which is sensible) reinforces my lack of warm
fuzzy feelings about patch 1.  I'd definitely leave those other calls
alone and keep this as just a tight wrapper around st.  Note though that
can just pass the regulator as the parameter to the devm_add_action_or_reset()
and simplify this a bit more now you don't need to get to the dev.

> +	regulator_disable(st->vddio_supply);
>  }
>  
>  static void inv_icm42600_disable_pm(void *_data)
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ