From: Alexey Dobriyan <adobriyan@gmail.com>
To: Dave Jones <davej@codemonkey.org.uk>
Cc: Andrew Morton <akpm@osdl.org>,
Marcelo Feitoza Parisi <marcelo@feitoza.com.br>,
linux-kernel@vger.kernel.org
Subject: [PATCH] nvidia-agp: use time_before_eq()
Date: Thu, 1 Dec 2005 00:39:02 +0300 [thread overview]
Message-ID: <20051130213902.GB12551@mipter.zuzino.mipt.ru> (raw)
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
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>
---
drivers/char/agp/nvidia-agp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/char/agp/nvidia-agp.c
+++ b/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");
}
next reply other threads:[~2005-11-30 21:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 21:39 Alexey Dobriyan [this message]
2005-11-30 22:50 ` [PATCH] nvidia-agp: use time_before_eq() Tim Schmielau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051130213902.GB12551@mipter.zuzino.mipt.ru \
--to=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@feitoza.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).