[PATCH 02/30] x86/apic/vector: Add missing annotation to lock_vector_lock(void)

From: Jules Irenge
Date: Fri Feb 14 2020 - 15:48:32 EST


Sparse reports a warning at unlock_vector_lock()

warning: context imbalance in unlock_vector_lock() - unexpected unlock

The root cause is the missing annotation at unlock_vector_lock()
Add the missing __releases(&vector_lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
arch/x86/kernel/apic/vector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index d7556939c6cf..8ee7848a355b 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -55,7 +55,7 @@ void lock_vector_lock(void) __acquires(&vector_lock)
raw_spin_lock(&vector_lock);
}

-void unlock_vector_lock(void)
+void unlock_vector_lock(void) __releases(&vector_lock)
{
raw_spin_unlock(&vector_lock);
}
--
2.24.1