Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760479AbYBNPmk (ORCPT ); Thu, 14 Feb 2008 10:42:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755466AbYBNPj1 (ORCPT ); Thu, 14 Feb 2008 10:39:27 -0500 Received: from ns2.uludag.org.tr ([193.140.100.220]:49929 "EHLO uludag.org.tr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753464AbYBNPjO (ORCPT ); Thu, 14 Feb 2008 10:39:14 -0500 From: =?utf-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Thomas Gleixner , =?utf-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Subject: [PATCH 13/14] kernel/irq/spurious.c: Use time_* macros Date: Thu, 14 Feb 2008 17:36:51 +0200 Message-Id: <1203003412-11594-14-git-send-email-caglar@pardus.org.tr> X-Mailer: git-send-email 1.5.3.7 In-Reply-To: y References: y MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1411 Lines: 40 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 Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: S.Çağlar Onur --- kernel/irq/spurious.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index a6b2bc8..088dabb 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c @@ -6,6 +6,7 @@ * This file contains spurious interrupt handling. */ +#include #include #include #include @@ -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++; -- 1.5.3.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/