Skip to contentSkip to conversation

x86/vector: Add missing annotation for void lock_vector_lock() and unlock_vector_lock()

PATCH New Jules Irenge 1 participant 1 message Oct 1, 2021 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/vector: Add missing annotation for void lock_vector_lock() and unlock_vector_lock()

Sparse reports a warning at lock_vector_lock() and unlock_vector_lock()

The root cause is the missing annotations at lock_vector_lock() and unlock_vector_lock()

Add the missing __acquires(&vector_lock)
Add the missing __releases(&vector_lock)

---
 arch/x86/kernel/apic/vector.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/apic/vector.c +2 -0
index c132daabe615..c824c346e501 100644
@@ -48,6 +48,7 @@ static DEFINE_PER_CPU(struct hlist_head, cleanup_list);
 #endif
 
 void lock_vector_lock(void)
+	__acquires(&vector_lock)
 {
 	/* Used to the online set of cpus does not change
 	 * during assign_irq_vector.
@@ -56,6 +57,7 @@ void lock_vector_lock(void)
 }
 
 void unlock_vector_lock(void)
+	__releases(&vector_lock)
 {
 	raw_spin_unlock(&vector_lock);
 }
Signature · 1 line
2.32.0