Skip to content

Commit 2288eba

Browse files
irengerafaeljw
authored andcommitted
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 <[email protected]> [ rjw: Two patches merged into one, subject & changelog ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 98d54f8 commit 2288eba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/acpi/osl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,7 @@ void acpi_os_delete_lock(acpi_spinlock handle)
15981598
*/
15991599

16001600
acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
1601+
__acquires(lockp)
16011602
{
16021603
acpi_cpu_flags flags;
16031604
spin_lock_irqsave(lockp, flags);
@@ -1609,6 +1610,7 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
16091610
*/
16101611

16111612
void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
1613+
__releases(lockp)
16121614
{
16131615
spin_unlock_irqrestore(lockp, flags);
16141616
}

0 commit comments

Comments
 (0)