* [patch 1/1] drivers/char/agp/nvidia-agp.c : Use of the time_before_eq() macro
@ 2005-07-31 11:10 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-31 11:10 UTC (permalink / raw)
To: davej; +Cc: linux-kernel, Marcelo Feitoza Parisi, domen
[-- Attachment #1: time_after-drivers_char_agp_nvidia-agp --]
[-- Type: text/plain, Size: 1049 bytes --]
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Use of the time_before_eq() macro, defined at linux/jiffies.h, which deal
with wrapping correctly and are nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
nvidia-agp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: quilt/drivers/char/agp/nvidia-agp.c
===================================================================
--- quilt.orig/drivers/char/agp/nvidia-agp.c
+++ quilt/drivers/char/agp/nvidia-agp.c
@@ -11,6 +11,7 @@
#include <linux/gfp.h>
#include <linux/page-flags.h>
#include <linux/mm.h>
+#include <linux/jiffies.h>
#include "agp.h"
/* NVIDIA registers */
@@ -256,7 +257,7 @@ static void nvidia_tlbflush(struct agp_m
do {
pci_read_config_dword(nvidia_private.dev_1,
NVIDIA_1_WBC, &wbc_reg);
- if ((signed)(end - jiffies) <= 0) {
+ if (time_before_eq(end, jiffies)) {
printk(KERN_ERR PFX
"TLB flush took more than 3 seconds.\n");
}
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-31 11:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-31 11:10 [patch 1/1] drivers/char/agp/nvidia-agp.c : Use of the time_before_eq() macro domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox