[PATCH] drivers/net/*: use time_after() and friends
They deal with wrapping correctly and are nicer to read. Also make jiffies-holding variables unsigned long. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
committed by
Jeff Garzik
parent
e03d72b99e
commit
ff5688ae1c
@@ -52,6 +52,7 @@
|
||||
#include <net/arp.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/arcdevice.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
/* "do nothing" functions for protocol drivers */
|
||||
static void null_rx(struct net_device *dev, int bufnum,
|
||||
@@ -733,7 +734,7 @@ static void arcnet_timeout(struct net_device *dev)
|
||||
|
||||
spin_unlock_irqrestore(&lp->lock, flags);
|
||||
|
||||
if (jiffies - lp->last_timeout > 10*HZ) {
|
||||
if (time_after(jiffies, lp->last_timeout + 10*HZ)) {
|
||||
BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n",
|
||||
msg, status, lp->intmask, lp->lasttrans_dest);
|
||||
lp->last_timeout = jiffies;
|
||||
|
Reference in New Issue
Block a user