[PATCH 22/30] ACPI: OSL: Add missing annotation for acpi_os_acquire_lock()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sparse reports a warning at acpi_os_acquire_lock()

warning: context imbalance in acpi_os_acquire_lock() - unexpected unlock

The root cause is the missing annotation at acpi_os_acquire_lock()
Add the missing annotation __acquires(lockp)

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
 drivers/acpi/osl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 41168c027a5a..7094abc5ffc6 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);
-- 
2.24.1




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux