Skip to content

Commit 87d82cf

Browse files
covanamIngo Molnar
authored andcommitted
hrtimers: Merge __hrtimer_init() into __hrtimer_setup()
__hrtimer_init() is only called by __hrtimer_setup(). Simplify by merging __hrtimer_init() into __hrtimer_setup(). 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/8a0a847a35f711f66b2d05b57255aa44e7e61279.1738746927.git.namcao@linutronix.de
1 parent 50177a8 commit 87d82cf

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

kernel/time/hrtimer.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,8 +1592,9 @@ static inline int hrtimer_clockid_to_base(clockid_t clock_id)
15921592
}
15931593
}
15941594

1595-
static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
1596-
enum hrtimer_mode mode)
1595+
static void __hrtimer_setup(struct hrtimer *timer,
1596+
enum hrtimer_restart (*function)(struct hrtimer *),
1597+
clockid_t clock_id, enum hrtimer_mode mode)
15971598
{
15981599
bool softtimer = !!(mode & HRTIMER_MODE_SOFT);
15991600
struct hrtimer_cpu_base *cpu_base;
@@ -1626,13 +1627,6 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
16261627
timer->is_hard = !!(mode & HRTIMER_MODE_HARD);
16271628
timer->base = &cpu_base->clock_base[base];
16281629
timerqueue_init(&timer->node);
1629-
}
1630-
1631-
static void __hrtimer_setup(struct hrtimer *timer,
1632-
enum hrtimer_restart (*function)(struct hrtimer *),
1633-
clockid_t clock_id, enum hrtimer_mode mode)
1634-
{
1635-
__hrtimer_init(timer, clock_id, mode);
16361630

16371631
if (WARN_ON_ONCE(!function))
16381632
timer->function = hrtimer_dummy_timeout;

0 commit comments

Comments
 (0)