aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/vcpu_stall_detector.c
diff options
context:
space:
mode:
authorNam Cao <[email protected]>2025-02-05 10:46:10 +0000
committerThomas Gleixner <[email protected]>2025-02-18 10:19:04 +0000
commit7f657ad0948257d131bca6953b3b553fe9f238d6 (patch)
treeb3d008823ca9adb9ecca83b0d8e4017298a7cc8a /drivers/misc/vcpu_stall_detector.c
parentmmc: dw_mmc: Switch to use hrtimer_setup() (diff)
downloadkernel-7f657ad0948257d131bca6953b3b553fe9f238d6.tar.gz
kernel-7f657ad0948257d131bca6953b3b553fe9f238d6.zip
misc: vcpu_stall_detector: Switch to use hrtimer_setup()
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. Signed-off-by: Nam Cao <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Zack Rusin <[email protected]> Link: https://lore.kernel.org/all/a1c984288c6e47d956c07339ced486a8ec95f8d5.1738746904.git.namcao@linutronix.de
Diffstat (limited to 'drivers/misc/vcpu_stall_detector.c')
-rw-r--r--drivers/misc/vcpu_stall_detector.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/vcpu_stall_detector.c b/drivers/misc/vcpu_stall_detector.c
index f0b1fc87490e..26166357b255 100644
--- a/drivers/misc/vcpu_stall_detector.c
+++ b/drivers/misc/vcpu_stall_detector.c
@@ -111,8 +111,7 @@ static int start_stall_detector_cpu(unsigned int cpu)
ping_timeout_ms = vcpu_stall_config.stall_timeout_sec *
MSEC_PER_SEC / 2;
- hrtimer_init(vcpu_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
- vcpu_hrtimer->function = vcpu_stall_detect_timer_fn;
+ hrtimer_setup(vcpu_hrtimer, vcpu_stall_detect_timer_fn, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
vcpu_stall_detector->is_initialized = true;
hrtimer_start(vcpu_hrtimer, ms_to_ktime(ping_timeout_ms),