summaryrefslogtreecommitdiff
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorJules Irenge <jbi.octave@gmail.com>2020-02-24 02:17:03 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-03-04 12:40:48 +0300
commit2288eba5ca746e4095ecb483463d8bc4e4d7b2fd (patch)
treed98140aa2a97977d54e468625d7d12ebdd7386a5 /drivers/acpi/osl.c
parent98d54f81e36ba3bf92172791eba5ca5bd813989b (diff)
downloadlinux-2288eba5ca746e4095ecb483463d8bc4e4d7b2fd.tar.xz
ACPI: OSL: Add missing __acquires/__releases annotations
Sparse reports a warnings at acpi_os_acquire_lock() and acpi_os_release_lock(): warning: context imbalance in acpi_os_acquire_lock() - unexpected unlock warning: context imbalance in acpi_os_release_lock() - unexpected unlock which result from missing __acquires/__releases annotations. Add the annotations as appropriate to get rid of the warnings. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> [ rjw: Two patches merged into one, subject & changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 41168c027a5a..762c5d50b8fe 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1598,6 +1598,7 @@ void acpi_os_delete_lock(acpi_spinlock handle)
*/
acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
+ __acquires(lockp)
{
acpi_cpu_flags flags;
spin_lock_irqsave(lockp, flags);
@@ -1609,6 +1610,7 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
*/
void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
+ __releases(lockp)
{
spin_unlock_irqrestore(lockp, flags);
}