[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173987199275.10177.16778177784113921215.tip-bot2@tip-bot2>
Date: Tue, 18 Feb 2025 09:46:32 -0000
From: "tip-bot2 for Nam Cao" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>, Thomas Gleixner <tglx@...utronix.de>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: timers/cleanups] bpf: Switch to use hrtimer_setup()
The following commit has been merged into the timers/cleanups branch of tip:
Commit-ID: deacdc871b48a6a75b03837e8faf3e0cd7c198ea
Gitweb: https://git.kernel.org/tip/deacdc871b48a6a75b03837e8faf3e0cd7c198ea
Author: Nam Cao <namcao@...utronix.de>
AuthorDate: Wed, 05 Feb 2025 11:39:05 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 18 Feb 2025 10:32:33 +01:00
bpf: 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@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/all/e4be2486f02a8e0ef5aa42624f1708d23e88ad57.1738746821.git.namcao@linutronix.de
---
kernel/bpf/helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index f27ce16..672abe1 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -1284,8 +1284,7 @@ static int __bpf_async_init(struct bpf_async_kern *async, struct bpf_map *map, u
atomic_set(&t->cancelling, 0);
INIT_WORK(&t->cb.delete_work, bpf_timer_delete_work);
- hrtimer_init(&t->timer, clockid, HRTIMER_MODE_REL_SOFT);
- t->timer.function = bpf_timer_cb;
+ hrtimer_setup(&t->timer, bpf_timer_cb, clockid, HRTIMER_MODE_REL_SOFT);
cb->value = (void *)async - map->record->timer_off;
break;
case BPF_ASYNC_TYPE_WQ:
Powered by blists - more mailing lists