[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3532c7ba07ff3c855764ca6a4146bd2c49b22c0e.1581282103.git.jbi.octave@gmail.com>
Date: Sun, 9 Feb 2020 22:27:04 +0000
From: Jules Irenge <jbi.octave@...il.com>
To: boqun.feng@...il.com
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org,
Jules Irenge <jbi.octave@...il.com>
Subject: [PATCH 01/11] hrtimer: Add missing annotation to lock_hrtimer_base()
Sparse reports several warnings;
warning: context imbalance in lock_hrtimer_base() - wrong count at exit
warning: context imbalance in hrtimer_start_range_ns() - unexpected unlock
warning: context imbalance in hrtimer_try_to_cancel() - unexpected unlock
warning: context imbalance in __hrtimer_get_remaining() - unexpected unlock
The root cause is a missing annotation of lock_hrtimer_base() which
causes also the "unexpected unlock" warnings.
Add the missing __acquires(timer->base) annotation
Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
kernel/time/hrtimer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 3a609e7344f3..bb8340e2a3b9 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -160,6 +160,7 @@ static inline bool is_migration_base(struct hrtimer_clock_base *base)
static
struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
unsigned long *flags)
+ __acquires(timer->base)
{
struct hrtimer_clock_base *base;
--
2.24.1
Powered by blists - more mailing lists