Skip to contentSkip to conversation

base/devres.c: quiet sparse noise about context imbalance

PATCH New H Hartley Sweeten 1 participant 1 message Aug 12, 2011 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base/devres.c: quiet sparse noise about context imbalance

devres_release_all and devres_release_group both aquire the lock &dev->devres_lock but the release of that lock is done in release_nodes. This results in sparse noise about context imbalance.

Add a lock annotation to release_nodes to quiet this noise.

Cc Greg Kroah-Hartman <[email protected]>

---

drivers/base/devres.c +1 -0
index cf7a0c7..65cd748 100644
@@ -397,6 +397,7 @@ static int remove_nodes(struct device *dev,
 
 static int release_nodes(struct device *dev, struct list_head *first,
 			 struct list_head *end, unsigned long flags)
+	__releases(&dev->devres_lock)
 {
 	LIST_HEAD(todo);
 	int cnt;