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.

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 <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/all/2b179e16ab830611fdcb09a33a5a531c9800679b.1738746904.git.namcao@linutronix.de

authored by

Nam Cao and committed by
Thomas Gleixner
abeebe88 5f8401cf

+1 -2
+1 -2
drivers/ntb/test/ntb_pingpong.c
··· 284 284 pp->ntb = ntb; 285 285 atomic_set(&pp->count, 0); 286 286 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); 289 288 290 289 return pp; 291 290 }