* true and let the handler run.
  */
 bool irq_wait_for_poll(struct irq_desc *desc)
-       __must_hold(&desc->lock)
 {
+       lockdep_assert_held(&desc->lock);
+
        if (WARN_ONCE(irq_poll_cpu == smp_processor_id(),
                      "irq poll in progress on cpu %d for irq %d\n",
                      smp_processor_id(), desc->irq_data.irq))
                         continue;
 
                /* Racy but it doesn't matter */
-               state = desc->istate;
-               barrier();
+               state = READ_ONCE(desc->istate);
                if (!(state & IRQS_SPURIOUS_DISABLED))
                        continue;
 
        }
 out:
        atomic_dec(&irq_poll_active);
-       mod_timer(&poll_spurious_irq_timer,
-                 jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
+       mod_timer(&poll_spurious_irq_timer, jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
 }
 
 static inline int bad_action_ret(irqreturn_t action_ret)
        struct irqaction *action;
        unsigned long flags;
 
-       if (bad_action_ret(action_ret)) {
-               printk(KERN_ERR "irq event %d: bogus return value %x\n",
-                               irq, action_ret);
-       } else {
-               printk(KERN_ERR "irq %d: nobody cared (try booting with "
-                               "the \"irqpoll\" option)\n", irq);
-       }
+       if (bad_action_ret(action_ret))
+               pr_err("irq event %d: bogus return value %x\n", irq, action_ret);
+       else
+               pr_err("irq %d: nobody cared (try booting with the \"irqpoll\" option)\n", irq);
        dump_stack();
-       printk(KERN_ERR "handlers:\n");
+       pr_err("handlers:\n");
 
        /*
         * We need to take desc->lock here. note_interrupt() is called
         */
        raw_spin_lock_irqsave(&desc->lock, flags);
        for_each_action_of_desc(desc, action) {
-               printk(KERN_ERR "[<%p>] %ps", action->handler, action->handler);
+               pr_err("[<%p>] %ps", action->handler, action->handler);
                if (action->thread_fn)
-                       printk(KERN_CONT " threaded [<%p>] %ps",
-                                       action->thread_fn, action->thread_fn);
-               printk(KERN_CONT "\n");
+                       pr_cont(" threaded [<%p>] %ps", action->thread_fn, action->thread_fn);
+               pr_cont("\n");
        }
        raw_spin_unlock_irqrestore(&desc->lock, flags);
 }
        }
 }
 
-static inline int
-try_misrouted_irq(unsigned int irq, struct irq_desc *desc,
-                 irqreturn_t action_ret)
+static inline bool try_misrouted_irq(unsigned int irq, struct irq_desc *desc,
+                                    irqreturn_t action_ret)
 {
        struct irqaction *action;
 
        if (!irqfixup)
-               return 0;
+               return false;
 
        /* We didn't actually handle the IRQ - see if it was misrouted? */
        if (action_ret == IRQ_NONE)
-               return 1;
+               return true;
 
        /*
         * But for 'irqfixup == 2' we also do it for handled interrupts if
         * traditional PC timer interrupt.. Legacy)
         */
        if (irqfixup < 2)
-               return 0;
+               return false;
 
        if (!irq)
-               return 1;
+               return true;
 
        /*
         * Since we don't get the descriptor lock, "action" can
-        * change under us.  We don't really care, but we don't
-        * want to follow a NULL pointer. So tell the compiler to
-        * just load it once by using a barrier.
+        * change under us.
         */
-       action = desc->action;
-       barrier();
+       action = READ_ONCE(desc->action);
        return action && (action->flags & IRQF_IRQPOLL);
 }
 
 {
        unsigned int irq;
 
-       if (desc->istate & IRQS_POLL_INPROGRESS ||
-           irq_settings_is_polled(desc))
+       if (desc->istate & IRQS_POLL_INPROGRESS || irq_settings_is_polled(desc))
                return;
 
        if (bad_action_ret(action_ret)) {
                /*
                 * Now kill the IRQ
                 */
-               printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
+               pr_emerg("Disabling IRQ #%d\n", irq);
                desc->istate |= IRQS_SPURIOUS_DISABLED;
                desc->depth++;
                irq_disable(desc);
 
-               mod_timer(&poll_spurious_irq_timer,
-                         jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
+               mod_timer(&poll_spurious_irq_timer, jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
        }
        desc->irqs_unhandled = 0;
 }
 int noirqdebug_setup(char *str)
 {
        noirqdebug = 1;
-       printk(KERN_INFO "IRQ lockup detection disabled\n");
-
+       pr_info("IRQ lockup detection disabled\n");
        return 1;
 }
-
 __setup("noirqdebug", noirqdebug_setup);
 module_param(noirqdebug, bool, 0644);
 MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true");
                return 1;
        }
        irqfixup = 1;
-       printk(KERN_WARNING "Misrouted IRQ fixup support enabled.\n");
-       printk(KERN_WARNING "This may impact system performance.\n");
-
+       pr_warn("Misrouted IRQ fixup support enabled.\n");
+       pr_warn("This may impact system performance.\n");
        return 1;
 }
-
 __setup("irqfixup", irqfixup_setup);
 module_param(irqfixup, int, 0644);
 
                return 1;
        }
        irqfixup = 2;
-       printk(KERN_WARNING "Misrouted IRQ fixup and polling support "
-                               "enabled\n");
-       printk(KERN_WARNING "This may significantly impact system "
-                               "performance\n");
+       pr_warn("Misrouted IRQ fixup and polling support enabled\n");
+       pr_warn("This may significantly impact system performance\n");
        return 1;
 }
-
 __setup("irqpoll", irqpoll_setup);