* [PATCH 25/30] zram: Add missing annotatin for zram_slot_lock()
[not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
@ 2020-02-23 23:17 ` Jules Irenge
2020-02-23 23:17 ` [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock() Jules Irenge
1 sibling, 0 replies; 2+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Jens Axboe, open list:BLOCK LAYER
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock()
[not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
2020-02-23 23:17 ` [PATCH 25/30] zram: Add missing annotatin for zram_slot_lock() Jules Irenge
@ 2020-02-23 23:17 ` Jules Irenge
1 sibling, 0 replies; 2+ messages in thread
From: Jules Irenge @ 2020-02-23 23:17 UTC (permalink / raw)
To: boqun.feng
Cc: jbi.octave, linux-kernel, Minchan Kim, Nitin Gupta,
Sergey Senozhatsky, Jens Axboe, open list:BLOCK LAYER
Sparse reports a warning at zram_slot_unlock()
warning: context imbalance in zram_slot_unlock() - unexpected unlock
The root cause is the missing annotation at zram_slot_unlock()
Add the missing __releases(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 1462b1bfec11..a38725452966 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -68,6 +68,7 @@ static void zram_slot_lock(struct zram *zram, u32 index)
}
static void zram_slot_unlock(struct zram *zram, u32 index)
+ __releases(ZRAM_LOCK)
{
bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags);
}
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-23 23:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0/30>
[not found] ` <20200223231711.157699-1-jbi.octave@gmail.com>
2020-02-23 23:17 ` [PATCH 25/30] zram: Add missing annotatin for zram_slot_lock() Jules Irenge
2020-02-23 23:17 ` [PATCH 26/30] zram: Add missing annotatin for zram_slot_unlock() Jules Irenge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).