Skip to contentSkip to conversation

drivers/char/agp/nvidia-agp.c : Use of the

PATCH New Marcelo Feitoza Parisi 1 participant 1 message Jul 16, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/char/agp/nvidia-agp.c : Use of the

Use of the time_before_eq() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.

drivers/char/agp/nvidia-agp.c +2 -1
@@ -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 @@
 		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");
 			}

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors