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] [day] [month] [year] [list]
Message-ID: <xie3jilnzhdgawwchqjubonjhulrgv3rcn23dhszzw2l6c5qij@vzczvm5aefgo>
Date: Sat, 8 Feb 2025 18:42:58 +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, Zack Rusin <zack.rusin@...adcom.com>
Subject: Re: [PATCH v2 18/45] power: reset: ltc2952-poweroff: Switch to use
 hrtimer_setup()

Hi,

On Wed, Feb 05, 2025 at 11:46:06AM +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.
> 
> Acked-by: Zack Rusin <zack.rusin@...adcom.com>
> Signed-off-by: Nam Cao <namcao@...utronix.de>
> Cc: Sebastian Reichel <sre@...nel.org>

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

Greetings,

-- Sebastian

> ---
>  drivers/power/reset/ltc2952-poweroff.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c
> index 1a6fc8d38e20..90c664d344d0 100644
> --- a/drivers/power/reset/ltc2952-poweroff.c
> +++ b/drivers/power/reset/ltc2952-poweroff.c
> @@ -162,11 +162,11 @@ static void ltc2952_poweroff_default(struct ltc2952_poweroff *data)
>  	data->wde_interval = 300L * NSEC_PER_MSEC;
>  	data->trigger_delay = ktime_set(2, 500L * NSEC_PER_MSEC);
>  
> -	hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> -	data->timer_trigger.function = ltc2952_poweroff_timer_trigger;
> +	hrtimer_setup(&data->timer_trigger, ltc2952_poweroff_timer_trigger, CLOCK_MONOTONIC,
> +		      HRTIMER_MODE_REL);
>  
> -	hrtimer_init(&data->timer_wde, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> -	data->timer_wde.function = ltc2952_poweroff_timer_wde;
> +	hrtimer_setup(&data->timer_wde, ltc2952_poweroff_timer_wde, CLOCK_MONOTONIC,
> +		      HRTIMER_MODE_REL);
>  }
>  
>  static int ltc2952_poweroff_init(struct platform_device *pdev)
> -- 
> 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