genirq: Add missing __must_hold() sparse annotation
authorJules Irenge <jbi.octave@gmail.com>
Mon, 16 Dec 2019 14:42:08 +0000 (14:42 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 9 Jan 2020 17:03:37 +0000 (18:03 +0100)
Add __must_hold() annotation to address the following sparse warning:

  warning: context imbalance in irq_wait_for_poll - unexpected unlock

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191216144208.29852-2-jbi.octave@gmail.com
kernel/irq/spurious.c

index 2ed97a7..f865e5f 100644 (file)
@@ -34,6 +34,7 @@ static atomic_t irq_poll_active;
  * true and let the handler run.
  */
 bool irq_wait_for_poll(struct irq_desc *desc)
+       __must_hold(&desc->lock)
 {
        if (WARN_ONCE(irq_poll_cpu == smp_processor_id(),
                      "irq poll in progress on cpu %d for irq %d\n",