]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
genirq: spurious.c: use time_* macros
authorS.Caglar Onur <caglar@pardus.org.tr>
Thu, 14 Feb 2008 15:36:51 +0000 (17:36 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 19 Feb 2008 09:43:58 +0000 (10:43 +0100)
The functions time_before, time_before_eq, time_after, and
time_after_eq are more robust for comparing jiffies against other
values.

So following patch implements usage of the time_after() macro, defined
at linux/jiffies.h, which deals with wrapping correctly

Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/spurious.c

index a6b2bc831dd05be5ee9cbff347566bf410870c26..088dabbf2d6a6cbca786ec80fe0ce6851175fef9 100644 (file)
@@ -6,6 +6,7 @@
  * This file contains spurious interrupt handling.
  */
 
+#include <linux/jiffies.h>
 #include <linux/irq.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
@@ -179,7 +180,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
                 * otherwise the couter becomes a doomsday timer for otherwise
                 * working systems
                 */
-               if (jiffies - desc->last_unhandled > HZ/10)
+               if (time_after(jiffies, desc->last_unhandled + HZ/10))
                        desc->irqs_unhandled = 1;
                else
                        desc->irqs_unhandled++;