Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05613bdd authored by Marcelo Feitoza Parisi's avatar Marcelo Feitoza Parisi Committed by Linus Torvalds
Browse files

[PATCH] nvidia-agp: use time_before_eq()



It deals with wrapping correctly and is nicer to read.

Signed-off-by: default avatarMarcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 50297cbf
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/gfp.h>
#include <linux/gfp.h>
#include <linux/page-flags.h>
#include <linux/page-flags.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/jiffies.h>
#include "agp.h"
#include "agp.h"


/* NVIDIA registers */
/* NVIDIA registers */
@@ -256,7 +257,7 @@ static void nvidia_tlbflush(struct agp_memory *mem)
		do {
		do {
			pci_read_config_dword(nvidia_private.dev_1,
			pci_read_config_dword(nvidia_private.dev_1,
					NVIDIA_1_WBC, &wbc_reg);
					NVIDIA_1_WBC, &wbc_reg);
			if ((signed)(end - jiffies) <= 0) {
			if (time_before_eq(end, jiffies)) {
				printk(KERN_ERR PFX
				printk(KERN_ERR PFX
				    "TLB flush took more than 3 seconds.\n");
				    "TLB flush took more than 3 seconds.\n");
			}
			}