[prev in list] [next in list] [prev in thread] [next in thread]
List: kernel-janitors
Subject: Re: [KJ] [PATCH] drivers/net/es3210.c : Use of the time_after() macro
From: Domen Puncer <domen () coderock ! org>
Date: 2005-07-29 9:42:54
Message-ID: 20050729094254.GA25129 () homer ! coderock ! org
[Download RAW message or body]
On 16/07/05 04:10 -0300, Marcelo Feitoza Parisi wrote:
>
> Use of the time_after() 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>
>
> --- linux/drivers/net/es3210.c 2005-07-13 17:52:19.000000000 -0300
> +++ linux-kj/drivers/net/es3210.c 2005-07-15 23:58:12.537072344 -0300
> @@ -56,6 +56,7 @@
> #include <linux/init.h>
> #include <linux/netdevice.h>
> #include <linux/etherdevice.h>
> +#include <linux/jiffies.h>
>
> #include <asm/io.h>
> #include <asm/system.h>
> @@ -331,7 +332,7 @@
> if (ei_debug > 1) printk("%s: resetting the ES3210...", dev->name);
>
> end = jiffies + 2*HZ/100;
> - while ((signed)(end - jiffies) > 0) continue;
> + while (time_after(end, jiffies)) continue;
Seems like I missed this on the first review...
msleep(20) should be much better here.
>
> ei_status.txing = 0;
> outb(0x01, ioaddr + ES_RESET_PORT);
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic