Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring: Switch to use hrtimer_setup_on_stack()

hrtimer_setup_on_stack() takes the callback function pointer as argument
and initializes the timer completely.

Replace hrtimer_init_on_stack() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/f0d4ac32ec4050710a656cee8385fa4427be33aa.1730386209.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
fc9f59de 46d076af

+4 -3
+4 -3
io_uring/io_uring.c
··· 2435 2435 { 2436 2436 ktime_t timeout; 2437 2437 2438 - hrtimer_init_on_stack(&iowq->t, clock_id, HRTIMER_MODE_ABS); 2439 2438 if (iowq->min_timeout) { 2440 2439 timeout = ktime_add_ns(iowq->min_timeout, start_time); 2441 - iowq->t.function = io_cqring_min_timer_wakeup; 2440 + hrtimer_setup_on_stack(&iowq->t, io_cqring_min_timer_wakeup, clock_id, 2441 + HRTIMER_MODE_ABS); 2442 2442 } else { 2443 2443 timeout = iowq->timeout; 2444 - iowq->t.function = io_cqring_timer_wakeup; 2444 + hrtimer_setup_on_stack(&iowq->t, io_cqring_timer_wakeup, clock_id, 2445 + HRTIMER_MODE_ABS); 2445 2446 } 2446 2447 2447 2448 hrtimer_set_expires_range_ns(&iowq->t, timeout, 0);