sparse, being a static analyzer, emits the following warnings:

  context imbalance in 'lock_vector_lock' - wrong count at exit
  context imbalance in 'unlock_vector_lock' - unexpected unlock

Help it by annotating the pair of functions with __acquires and
__releases.

Cc: Yinghai Lu <ying...@kernel.org>
Cc: Thomas Gleixner <t...@linutronix.de>
Signed-off-by: Ramkumar Ramachandra <artag...@gmail.com>
---
 arch/x86/kernel/apic/io_apic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9ed796c..b756417 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1061,6 +1061,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin,
 EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
 
 void lock_vector_lock(void)
+       __acquires(&vector_lock)
 {
        /* Used to the online set of cpus does not change
         * during assign_irq_vector.
@@ -1069,6 +1070,7 @@ void lock_vector_lock(void)
 }
 
 void unlock_vector_lock(void)
+       __releases(&vector_lock)
 {
        raw_spin_unlock(&vector_lock);
 }
-- 
1.8.3.2.733.gf8abaeb

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to