Messages in this thread Patch in this message | | | From | Jules Irenge <> | Subject | [PATCH 8/9] power: wakeup: Add missing annotation for wakeup_sources_stats_seq_start() and wakeup_sources_stats_seq_stop() | Date | Sat, 11 Apr 2020 01:19:32 +0100 |
| |
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@gmail.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
| |