lkml.org 
[lkml]   [2022]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] timers: fix LVL_START macro
Date
The number of buckets per level should be LVL_SIZE, not LVL_SIZE-1.

Signed-off-by: Yun Zhou <yun.zhou@windriver.com>
---
kernel/time/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 717fcb9fb14a..1116b208093e 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(jiffies_64);
* time. We start from the last possible delta of the previous level
* so that we can later add an extra LVL_GRAN(n) to n (see calc_index()).
*/
-#define LVL_START(n) ((LVL_SIZE - 1) << (((n) - 1) * LVL_CLK_SHIFT))
+#define LVL_START(n) (LVL_SIZE << (((n) - 1) * LVL_CLK_SHIFT))

/* Size of each clock level */
#define LVL_BITS 6
--
2.35.2
\
 
 \ /
  Last update: 2022-11-15 04:01    [W:0.061 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site