Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750761AbVK3VYW (ORCPT ); Wed, 30 Nov 2005 16:24:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750756AbVK3VYW (ORCPT ); Wed, 30 Nov 2005 16:24:22 -0500 Received: from nproxy.gmail.com ([64.233.182.192]:18989 "EHLO nproxy.gmail.com") by vger.kernel.org with ESMTP id S1750761AbVK3VYV (ORCPT ); Wed, 30 Nov 2005 16:24:21 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:mime-version:content-type:content-disposition:user-agent; b=rxUfb91SYHInYPrD3NhlAuu0nxMWLyGr4FAkl8k1GcB2zZXZZic8E9O5jbiZBF5QundOCsAXuzjWAyZMXRLnCHDirqavoQXfQqRSn+IHjszmESTsQnPhZ44S8Nsf4WpPQSUwY+nojj3vzddt0GFBtWRI77ndTpSZtQIKyPa3aU8= Date: Thu, 1 Dec 2005 00:39:02 +0300 From: Alexey Dobriyan To: Dave Jones Cc: Andrew Morton , Marcelo Feitoza Parisi , linux-kernel@vger.kernel.org Subject: [PATCH] nvidia-agp: use time_before_eq() Message-ID: <20051130213902.GB12551@mipter.zuzino.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 36 From: Marcelo Feitoza Parisi It deals with wrapping correctly and is nicer to read. Signed-off-by: Marcelo Feitoza Parisi Signed-off-by: Alexey Dobriyan --- 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 #include #include +#include #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"); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/