[patch 1/1] drivers/char/agp/nvidia-agp.c : Use of the time_before_eq() macro

domen_at_coderock.org
Date: 07/31/05

  • Next message: apache: "How come that in kernel 2.6.11 a dvd is readable, but not in kernel 2.6.12?"
    Date:	Sun, 31 Jul 2005 13:10:59 +0200
    To: davej@codemonkey.org.uk
    
    

    From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>

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

    Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
    Signed-off-by: Domen Puncer <domen@coderock.org>

    ---
     nvidia-agp.c |    3 ++-
     1 files changed, 2 insertions(+), 1 deletion(-)
    Index: quilt/drivers/char/agp/nvidia-agp.c
    ===================================================================
    --- quilt.orig/drivers/char/agp/nvidia-agp.c
    +++ quilt/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");
     			}
    --
    -
    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/
    

  • Next message: apache: "How come that in kernel 2.6.11 a dvd is readable, but not in kernel 2.6.12?"

    Relevant Pages