Skip to content

Commit 1cc24f2

Browse files
covanamIngo Molnar
authored andcommitted
hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()
The struct hrtimer::function field can only be changed using hrtimer_setup*() or hrtimer_update_function(), and both already null-check 'function'. Therefore, null-checking 'function' in hrtimer_start_range_ns() is not necessary. 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/4661c571ee87980c340ccc318fc1a473c0c8f6bc.1738746927.git.namcao@linutronix.de
1 parent 04257da commit 1cc24f2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/time/hrtimer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,6 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
13161316
struct hrtimer_clock_base *base;
13171317
unsigned long flags;
13181318

1319-
if (WARN_ON_ONCE(!ACCESS_PRIVATE(timer, function)))
1320-
return;
13211319
/*
13221320
* Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
13231321
* match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard

0 commit comments

Comments
 (0)