Skip to contentSkip to conversation

hrtimer: Fix incorrect #endif comment for BITS_PER_LONG check

PATCH Applied Zhan Xusheng 2 participants 2 messages Mar 31 – Apr 1 High-resolution timers, timer wheel, clockevents

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hrtimer: Fix incorrect #endif comment for BITS_PER_LONG check

The #endif comment says "BITS_PER_LONG >= 64", but the corresponding #if guard is "BITS_PER_LONG < 64". The comment was originally correct when the block had a three-way #if/#else/#endif structure, where the #else branch provided a 64-bit inline version. Commit 79bf2bb335b8 ("[PATCH] tick-management: dyntick / highres functionality") removed the #else branch but did not update the #endif comment, leaving it inconsistent with the remaining #if condition.

Fix the comment to match the preprocessor guard.

---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/hrtimer.c +1 -1
index 860af7a58428..8c92a2e2cf8c 100644
@@ -340,7 +340,7 @@ s64 __ktime_divns(const ktime_t kt, s64 div)
 	return dclc < 0 ? -tmp : tmp;
 }
 EXPORT_SYMBOL_GPL(__ktime_divns);
-#endif /* BITS_PER_LONG >= 64 */
+#endif /* BITS_PER_LONG < 64 */
 
 /*
  * Add two ktime values and do a safety check for overflow:
Signature · 1 line
2.43.0
merge bot Applied
#1 lore raw
The following commit has been merged into the timers/core branch of tip:

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

Commit-ID:     c5283a1ffdd5a877120279d164e9d5761e8455af
Gitweb:        https://git.kernel.org/tip/c5283a1ffdd5a877120279d164e9d5761e8455af
Author:        Zhan Xusheng <[email protected]>
AuthorDate:    Tue, 31 Mar 2026 15:48:11 +08:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 01 Apr 2026 18:48:15 +02:00

hrtimer: Fix incorrect #endif comment for BITS_PER_LONG check

The #endif comment says "BITS_PER_LONG >= 64", but the corresponding #if guard is "BITS_PER_LONG < 64".

The comment was originally correct when the block had a three-way #if/#else/#endif structure, where the #else branch provided a 64-bit inline version. Commit 79bf2bb335b8 ("[PATCH] tick-management: dyntick / highres functionality") removed the #else branch but did not update the #endif comment, leaving it inconsistent with the remaining #if condition.

Fix the comment to match the preprocessor guard.

---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/hrtimer.c +1 -1
index 2db171b..000fb6b 100644
@@ -355,7 +355,7 @@ s64 __ktime_divns(const ktime_t kt, s64 div)
 	return dclc < 0 ? -tmp : tmp;
 }
 EXPORT_SYMBOL_GPL(__ktime_divns);
-#endif /* BITS_PER_LONG >= 64 */
+#endif /* BITS_PER_LONG < 64 */
 
 /*
  * Add two ktime values and do a safety check for overflow: