From: Nam Cao Date: Wed, 5 Feb 2025 10:39:06 +0000 (+0100) Subject: ubifs: Switch to use hrtimer_setup() X-Git-Tag: v6.15-rc1~203^2~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1654eba8f74d1fcb95dd63e549c621722adc2689;p=thirdparty%2Fkernel%2Flinux.git ubifs: 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 Signed-off-by: Thomas Gleixner Acked-by: Richard Weinberger Link: https://lore.kernel.org/all/f5767e50aaa2935b3e4a0e9cf1bc4365d6b0c1a0.1738746821.git.namcao@linutronix.de --- diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 01d8eb1703820..a79f229df4754 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -1179,8 +1179,7 @@ int ubifs_wbuf_init(struct ubifs_info *c, struct ubifs_wbuf *wbuf) wbuf->c = c; wbuf->next_ino = 0; - hrtimer_init(&wbuf->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - wbuf->timer.function = wbuf_timer_callback_nolock; + hrtimer_setup(&wbuf->timer, wbuf_timer_callback_nolock, CLOCK_MONOTONIC, HRTIMER_MODE_REL); return 0; }