lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/30] x86/apic/vector: Add missing annotation to lock_vector_lock(void)
Date
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@gmail.com>
---
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
\
 
 \ /
  Last update: 2020-02-14 21:49    [W:0.142 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site