You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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
@@ -39,6 +39,7 @@
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <pcmcia/cs_types.h>
|
||||
#include <pcmcia/cs.h>
|
||||
@@ -796,7 +797,7 @@ static void media_check(unsigned long arg)
|
||||
media = inw(ioaddr+WN4_MEDIA) & 0xc810;
|
||||
|
||||
/* Ignore collisions unless we've had no irq's recently */
|
||||
if (jiffies - lp->last_irq < HZ) {
|
||||
if (time_before(jiffies, lp->last_irq + HZ)) {
|
||||
media &= ~0x0010;
|
||||
} else {
|
||||
/* Try harder to detect carrier errors */
|
||||
|
||||
Reference in New Issue
Block a user