diff options
author | Jules Irenge | 2020-02-14 20:47:29 +0000 |
---|---|---|
committer | Greg Kroah-Hartman | 2020-03-04 19:15:20 +0100 |
commit | 68464d79015a1bbb41872a9119a07b2cb151a4b9 (patch) | |
tree | 6d5d79906119bd5710b60f6eafc5e23e538e970d /drivers/base | |
parent | ab7789c5174cb12c9f9fb4f85efc6d18e7f04c2b (diff) |
driver core: Add missing annotation for device_links_write_lock()
Sparse reports a warning at device_links_write_lock()
warning: context imbalance in evice_links_write_lock()
- wrong count at exit
The root cause is the missing annotation at device_links_write_lock()
Add the missing __acquires(&device_links_srcu) annotation
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20200214204741.94112-19-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index ae6804da67b2..26acb92aa966 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -64,7 +64,7 @@ static inline void device_links_write_unlock(void) mutex_unlock(&device_links_lock); } -int device_links_read_lock(void) +int device_links_read_lock(void) __acquires(&device_links_srcu) { return srcu_read_lock(&device_links_srcu); } |