[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200411001933.10072-9-jbi.octave@gmail.com>
Date: Sat, 11 Apr 2020 01:19:32 +0100
From: Jules Irenge <jbi.octave@...il.com>
To: linux-kernel@...r.kernel.org
Cc: boqun.feng@...il.com, "Rafael J. Wysocki" <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-pm@...r.kernel.org (open list:HIBERNATION (aka Software Suspend,
aka swsusp))
Subject: [PATCH 8/9] power: wakeup: Add missing annotation for wakeup_sources_stats_seq_start() and wakeup_sources_stats_seq_stop()
Sparse reports warnings at wakeup_sources_stats_seq_start()
and wakeup_sources_stats_seq_stop()
warning: context imbalance in wakeup_sources_stats_seq_start()
- wrong count at exit
context imbalance in wakeup_sources_stats_seq_stop()
- unexpected unlock
The root cause is the missing annotation at
wakeup_sources_stats_seq_start() and wakeup_sources_stats_seq_stop()
Add the missing __acquires(&wakeup_srcu) annotation
Add the missing __releases(&wakeup_srcu) annotation
Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
drivers/base/power/wakeup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 27f3e60608e5..41ce086d8f57 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -1092,6 +1092,7 @@ static int print_wakeup_source_stats(struct seq_file *m,
static void *wakeup_sources_stats_seq_start(struct seq_file *m,
loff_t *pos)
+ __acquires(&wakeup_srcu)
{
struct wakeup_source *ws;
loff_t n = *pos;
@@ -1132,6 +1133,7 @@ static void *wakeup_sources_stats_seq_next(struct seq_file *m,
}
static void wakeup_sources_stats_seq_stop(struct seq_file *m, void *v)
+ __releases(&wakeup_srcu)
{
int *srcuidx = m->private;
--
2.24.1
Powered by blists - more mailing lists