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

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


Sparse reports a warning at lock_vector_lock(void)

warning: context imbalance in lock_vector_lock() - wrong count at exit

The root cause is the missing annotation at lock_vector_lock(void)
Add the missing __acquires(&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 2c5676b0a6e7..d7556939c6cf 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -47,7 +47,7 @@ static struct irq_matrix *vector_matrix;
static DEFINE_PER_CPU(struct hlist_head, cleanup_list);
#endif

-void lock_vector_lock(void)
+void lock_vector_lock(void) __acquires(&vector_lock)
{
/* Used to the online set of cpus does not change
* during assign_irq_vector.
--
2.24.1