projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9779489
)
hrtimers: Switch to use __htimer_setup()
author
Nam Cao
<namcao@linutronix.de>
Wed, 5 Feb 2025 10:55:11 +0000
(11:55 +0100)
committer
Ingo Molnar
<mingo@kernel.org>
Sat, 5 Apr 2025 08:30:17 +0000
(10:30 +0200)
__hrtimer_init_sleeper() calls __hrtimer_init() and also sets up the
callback function. But there is already __hrtimer_setup() which does both
actions.
Switch to use __hrtimer_setup() to simplify the code.
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link:
https://lore.kernel.org/all/d9a45a51b6a8aa0045310d63f73753bf6b33f385.1738746927.git.namcao@linutronix.de
kernel/time/hrtimer.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/time/hrtimer.c
b/kernel/time/hrtimer.c
index b7555ba7033abf9cae834a8b3b40bf4a5cfe7924..2d2835cf2659528cddbe8c29e613ddfb033d5ade 100644
(file)
--- a/
kernel/time/hrtimer.c
+++ b/
kernel/time/hrtimer.c
@@
-2061,8
+2061,7
@@
static void __hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
mode |= HRTIMER_MODE_HARD;
}
- __hrtimer_init(&sl->timer, clock_id, mode);
- sl->timer.function = hrtimer_wakeup;
+ __hrtimer_setup(&sl->timer, hrtimer_wakeup, clock_id, mode);
sl->task = current;
}