[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210829065858.30397-1-dianlong_lee@163.com>
Date: Sun, 29 Aug 2021 06:58:58 +0000
From: Dianlong Li <dianlong_lee@....com>
To: tglx@...utronix.de
Cc: john.stultz@...aro.org, sboyd@...nel.org,
linux-kernel@...r.kernel.org, Dianlong Li <dianlong_lee@....com>
Subject: [PATCH] timers: Use the macro LVL_OFFS() to calculate the offset of each level
offset records the offset of the first bucket of each level,
this can be replaced by the macro LVL_OFFS()
Signed-off-by: Dianlong Li <dianlong_lee@....com>
---
kernel/time/timer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index e3d2c23c413d..3ee5322157a1 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1522,12 +1522,12 @@ static int next_pending_bucket(struct timer_base *base, unsigned offset,
static unsigned long __next_timer_interrupt(struct timer_base *base)
{
unsigned long clk, next, adj;
- unsigned lvl, offset = 0;
+ unsigned int lvl;
next = base->clk + NEXT_TIMER_MAX_DELTA;
clk = base->clk;
- for (lvl = 0; lvl < LVL_DEPTH; lvl++, offset += LVL_SIZE) {
- int pos = next_pending_bucket(base, offset, clk & LVL_MASK);
+ for (lvl = 0; lvl < LVL_DEPTH; lvl++) {
+ int pos = next_pending_bucket(base, LVL_OFFS(lvl), clk & LVL_MASK);
unsigned long lvl_clk = clk & LVL_CLK_MASK;
if (pos >= 0) {
--
2.17.1
Powered by blists - more mailing lists