Commit 2288eba5 authored by Jules Irenge's avatar Jules Irenge Committed by Rafael J. Wysocki

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: default avatarJules Irenge <jbi.octave@gmail.com>
[ rjw: Two patches merged into one, subject & changelog ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 98d54f81
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment