Skip to content

Commit abeebe8

Browse files
covanamKAGA-KOKO
authored andcommitted
ntb: ntb_pingpong: 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/2b179e16ab830611fdcb09a33a5a531c9800679b.1738746904.git.namcao@linutronix.de
1 parent 5f8401c commit abeebe8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/ntb/test/ntb_pingpong.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ static struct pp_ctx *pp_create_data(struct ntb_dev *ntb)
284284
pp->ntb = ntb;
285285
atomic_set(&pp->count, 0);
286286
spin_lock_init(&pp->lock);
287-
hrtimer_init(&pp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
288-
pp->timer.function = pp_timer_func;
287+
hrtimer_setup(&pp->timer, pp_timer_func, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
289288

290289
return pp;
291290
}

0 commit comments

Comments
 (0)