Skip to content

Commit

Permalink
base/devres.c: quiet sparse noise about context imbalance
Browse files Browse the repository at this point in the history
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.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Aug 22, 2011
1 parent 8ea95e0 commit 86ec67f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/base/devres.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86ec67f

Please sign in to comment.