diff options
author | S.Caglar Onur <caglar@pardus.org.tr> | 2008-03-28 17:27:05 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-04-09 13:38:30 -0400 |
commit | 5cf1f7cef1c67b5c81736f00e81a2890e07041b9 (patch) | |
tree | 8c983819659598ad4330b1330be51033777449f7 /arch/ia64/kernel/unaligned.c | |
parent | 734bc367b4830a4c80502a3f9ded7428b1c652e3 (diff) |
[IA64] arch/ia64/kernel/: use time_* macros
The functions time_before, time_before_eq, time_after, and time_after_eq are
more robust for comparing jiffies against other values.
So use the time_after() & time_before() macros, defined at linux/jiffies.h,
which deal with wrapping correctly
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/unaligned.c')
-rw-r--r-- | arch/ia64/kernel/unaligned.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 6903361d11a5..ff0e7c10faa7 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * 2001/08/13 Correct size of extended floats (float_fsz) from 16 to 10 bytes. | 13 | * 2001/08/13 Correct size of extended floats (float_fsz) from 16 to 10 bytes. |
14 | * 2001/01/17 Add support emulation of unaligned kernel accesses. | 14 | * 2001/01/17 Add support emulation of unaligned kernel accesses. |
15 | */ | 15 | */ |
16 | #include <linux/jiffies.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
18 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
@@ -1290,7 +1291,7 @@ within_logging_rate_limit (void) | |||
1290 | { | 1291 | { |
1291 | static unsigned long count, last_time; | 1292 | static unsigned long count, last_time; |
1292 | 1293 | ||
1293 | if (jiffies - last_time > 5*HZ) | 1294 | if (time_after(jiffies, last_time + 5 * HZ)) |
1294 | count = 0; | 1295 | count = 0; |
1295 | if (count < 5) { | 1296 | if (count < 5) { |
1296 | last_time = jiffies; | 1297 | last_time = jiffies; |