mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: timers/cleanups] hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()
@ 2025-04-05  8:46 tip-bot2 for Nam Cao
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Nam Cao @ 2025-04-05  8:46 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Nam Cao, Thomas Gleixner, Ingo Molnar, x86, linux-kernel

The following commit has been merged into the timers/cleanups branch of tip:

Commit-ID:     1cc24f2e766c5a6606b834a677bd58991c1b9781
Gitweb:        https://git.kernel.org/tip/1cc24f2e766c5a6606b834a677bd58991c1b9781
Author:        Nam Cao <namcao@linutronix.de>
AuthorDate:    Wed, 05 Feb 2025 11:55:17 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Sat, 05 Apr 2025 10:30:17 +02:00

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
---
 kernel/time/hrtimer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 88ea4bb..e883f65 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1316,8 +1316,6 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
 	struct hrtimer_clock_base *base;
 	unsigned long flags;
 
-	if (WARN_ON_ONCE(!ACCESS_PRIVATE(timer, function)))
-		return;
 	/*
 	 * Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
 	 * match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: timers/cleanups] hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()
@ 2025-04-04 17:54 tip-bot2 for Nam Cao
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Nam Cao @ 2025-04-04 17:54 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Nam Cao, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/cleanups branch of tip:

Commit-ID:     a86ced94eb6743e4fb30e568ff557f3bc31a3b69
Gitweb:        https://git.kernel.org/tip/a86ced94eb6743e4fb30e568ff557f3bc31a3b69
Author:        Nam Cao <namcao@linutronix.de>
AuthorDate:    Wed, 05 Feb 2025 11:55:17 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 04 Apr 2025 19:46:06 +02:00

hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()

The 'function' field of struct hrtimer 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>
Link: https://lore.kernel.org/all/4661c571ee87980c340ccc318fc1a473c0c8f6bc.1738746927.git.namcao@linutronix.de

---
 kernel/time/hrtimer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 88ea4bb..e883f65 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1316,8 +1316,6 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
 	struct hrtimer_clock_base *base;
 	unsigned long flags;
 
-	if (WARN_ON_ONCE(!ACCESS_PRIVATE(timer, function)))
-		return;
 	/*
 	 * Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
 	 * match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: timers/cleanups] hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()
@ 2025-04-04 17:34 tip-bot2 for Nam Cao
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Nam Cao @ 2025-04-04 17:34 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Nam Cao, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/cleanups branch of tip:

Commit-ID:     e767a548b68989ed3f4e4904ef50847f8b5ccd7c
Gitweb:        https://git.kernel.org/tip/e767a548b68989ed3f4e4904ef50847f8b5ccd7c
Author:        Nam Cao <namcao@linutronix.de>
AuthorDate:    Wed, 05 Feb 2025 11:55:17 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 04 Apr 2025 19:26:44 +02:00

hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()

The 'function' field of struct hrtimer 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>
Link: https://lore.kernel.org/all/4661c571ee87980c340ccc318fc1a473c0c8f6bc.1738746927.git.namcao@linutronix.de

---
 kernel/time/hrtimer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 88ea4bb..e883f65 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1316,8 +1316,6 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
 	struct hrtimer_clock_base *base;
 	unsigned long flags;
 
-	if (WARN_ON_ONCE(!ACCESS_PRIVATE(timer, function)))
-		return;
 	/*
 	 * Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
 	 * match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: timers/cleanups] hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()
@ 2025-04-04 14:36 tip-bot2 for Nam Cao
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Nam Cao @ 2025-04-04 14:36 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Nam Cao, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/cleanups branch of tip:

Commit-ID:     eb396f4815e01c9fffd3ae9711b6c26503bbd9e5
Gitweb:        https://git.kernel.org/tip/eb396f4815e01c9fffd3ae9711b6c26503bbd9e5
Author:        Nam Cao <namcao@linutronix.de>
AuthorDate:    Wed, 05 Feb 2025 11:55:17 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 04 Apr 2025 16:26:10 +02:00

hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns()

The 'function' field of struct hrtimer 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>
Link: https://lore.kernel.org/all/4661c571ee87980c340ccc318fc1a473c0c8f6bc.1738746927.git.namcao@linutronix.de

---
 kernel/time/hrtimer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 88ea4bb..e883f65 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1316,8 +1316,6 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
 	struct hrtimer_clock_base *base;
 	unsigned long flags;
 
-	if (WARN_ON_ONCE(!ACCESS_PRIVATE(timer, function)))
-		return;
 	/*
 	 * Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
 	 * match on CONFIG_PREEMPT_RT = n. With PREEMPT_RT check the hard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-05  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-05  8:46 [tip: timers/cleanups] hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns() tip-bot2 for Nam Cao
  -- strict thread matches above, loose matches on Subject: below --
2025-04-04 17:54 tip-bot2 for Nam Cao
2025-04-04 17:34 tip-bot2 for Nam Cao
2025-04-04 14:36 tip-bot2 for Nam Cao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®