[prev in list] [next in list] [prev in thread] [next in thread]
List: kernel-janitors
Subject: [KJ] [PATCH] drivers/net/seeq8005.c : Use of the time_before() macro
From: Marcelo Feitoza Parisi <marcelo () feitoza ! com ! br>
Date: 2005-07-16 7:21:44
Message-ID: 42D8B588.7070304 () feitoza ! com ! br
[Download RAW message or body]
["seeq8005.patch" (text/x-patch)]
Use of the time_before() 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/seeq8005.c 2005-06-17 16:48:29.000000000 -0300
+++ linux-kj/drivers/net/seeq8005.c 2005-07-16 03:55:43.012670760 -0300
@@ -699,7 +699,7 @@
int ioaddr = dev->base_addr;
int status = inw(SEEQ_STATUS);
int transmit_ptr = 0;
- int tmp;
+ unsigned long tmp;
if (net_debug>4) {
printk("%s: send 0x%04x\n",dev->name,length);
@@ -724,7 +724,8 @@
/* drain FIFO */
tmp = jiffies;
- while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0) && (jiffies - tmp < HZ))
+ while ( (((status=inw(SEEQ_STATUS)) & SEEQSTAT_FIFO_EMPTY) == 0)
+ && (time_before(jiffies, tmp + HZ)))
mb();
/* doit ! */
_______________________________________________
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