lkml.org 
[lkml]   [2020]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 25/30] zram: Add missing annotatin for zram_slot_lock()
Date
Sparse reports a warning at zram_slot_lock()
warning: context imbalance in zram_slot_lock() - wrong count at exit
The root cause is the missing annotation at zram_slot_lock()
Add the missing __acquires(ZRAM_LOCK) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/block/zram/zram_drv.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 1bdb5793842b..1462b1bfec11 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -62,6 +62,7 @@ static int zram_slot_trylock(struct zram *zram, u32 index)
}

static void zram_slot_lock(struct zram *zram, u32 index)
+ __acquires(ZRAM_LOCK)
{
bit_spin_lock(ZRAM_LOCK, &zram->table[index].flags);
}
--
2.24.1
\
 
 \ /
  Last update: 2020-02-24 00:18    [W:0.234 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site