Skip to contentSkip to conversation

regmap: Provide __acquires/__releases annotations

PATCH Applied Fabio Estevam 2 participants 2 messages Jul 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regmap: Provide __acquires/__releases annotations

From: Fabio Estevam <[email protected]>

Fix the following sparse warnings:

drivers/base/regmap/regmap.c:305:13: warning: context imbalance in 'regmap_lock_spinlock' - wrong count at exit drivers/base/regmap/regmap.c:314:13: warning: context imbalance in 'regmap_unlock_spinlock' - unexpected unlock

---
 drivers/base/regmap/regmap.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/base/regmap/regmap.c +2 -0
index e0d0c7d..d7144cf 100644
@@ -303,6 +303,7 @@ static void regmap_unlock_mutex(void *__map)
 }
 
 static void regmap_lock_spinlock(void *__map)
+__acquires(&map->spinlock)
 {
 	struct regmap *map = __map;
 	unsigned long flags;
@@ -312,6 +313,7 @@ static void regmap_lock_spinlock(void *__map)
 }
 
 static void regmap_unlock_spinlock(void *__map)
+__releases(&map->spinlock)
 {
 	struct regmap *map = __map;
 	spin_unlock_irqrestore(&map->spinlock, map->spinlock_flags);
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Fix the following sparse warnings:

Applied, thanks.