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: <roiad6zbj4z2zizl6muhvlstwu4mvsh6f6g2tf2feps7ihut3g@aknn232lzqo6>
Date: Sat, 8 Feb 2025 18:42:21 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Nam Cao <namcao@...utronix.de>
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>, 
	Frederic Weisbecker <frederic@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, 
	linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>, 
	Zack Rusin <zack.rusin@...adcom.com>
Subject: Re: [PATCH v2 17/45] power: supply: ab8500_chargalg: Switch to use
 hrtimer_setup()

Hi,

On Wed, Feb 05, 2025 at 11:46:05AM +0100, Nam Cao wrote:
> hrtimer_setup() takes the callback function pointer as argument and
> initializes the timer completely.
> 
> Replace hrtimer_init() and the open coded initialization of
> hrtimer::function with the new setup mechanism.
> 
> Patch was created by using Coccinelle.
> 
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> Acked-by: Zack Rusin <zack.rusin@...adcom.com>
> Signed-off-by: Nam Cao <namcao@...utronix.de>
> ---

Acked-by: Sebastian Reichel <sebastian.reichel@...labora.com>

-- Sebastian

>  drivers/power/supply/ab8500_chargalg.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
> index 7a8d1feb8e90..dc6c8b0dd1cf 100644
> --- a/drivers/power/supply/ab8500_chargalg.c
> +++ b/drivers/power/supply/ab8500_chargalg.c
> @@ -1787,13 +1787,12 @@ static int ab8500_chargalg_probe(struct platform_device *pdev)
>  	psy_cfg.drv_data = di;
>  
>  	/* Initilialize safety timer */
> -	hrtimer_init(&di->safety_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> -	di->safety_timer.function = ab8500_chargalg_safety_timer_expired;
> +	hrtimer_setup(&di->safety_timer, ab8500_chargalg_safety_timer_expired, CLOCK_MONOTONIC,
> +		      HRTIMER_MODE_REL);
>  
>  	/* Initilialize maintenance timer */
> -	hrtimer_init(&di->maintenance_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> -	di->maintenance_timer.function =
> -		ab8500_chargalg_maintenance_timer_expired;
> +	hrtimer_setup(&di->maintenance_timer, ab8500_chargalg_maintenance_timer_expired,
> +		      CLOCK_MONOTONIC, HRTIMER_MODE_REL);
>  
>  	/* Init work for chargalg */
>  	INIT_DEFERRABLE_WORK(&di->chargalg_periodic_work,
> -- 
> 2.39.5
> 
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ