mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
[PATCH] nvidia-agp: use time_before_eq()
It deals with wrapping correctly and is nicer to read. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
50297cbf07
commit
05613bdd86
@ -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_memory *mem)
|
||||
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user