drivers/net/seeq8005.c : Use of the time_before() macro
Subsystems (2)
PATCH 1/1 drivers/net/seeq8005.c : Use of the time_before() macro
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 <[email protected]>
drivers/net/seeq8005.c +3 -2
@@ -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
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors