drivers/net/3c59x.c : Use of the time_after() macro
Subsystems (2)
PATCH 1/1 drivers/net/3c59x.c : Use of the time_after() macro
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 <[email protected]>
drivers/net/3c59x.c +2 -1
@@ -258,6 +258,7 @@#include <linux/highmem.h> #include <linux/eisa.h> #include <linux/bitops.h> +#include <linux/jiffies.h> #include <asm/irq.h> /* For NR_IRQS only. */ #include <asm/io.h> #include <asm/uaccess.h>
@@ -2668,7 +2669,7 @@ skb =dev_alloc_skb (PKT_BUF_SZ );if (skb ==NULL ) {static unsigned long last_jif; -if ((jiffies - last_jif) >10 *HZ ) { +if (time_after (jiffies, last_jif +10 *HZ )) {printk (KERN_WARNING "%s: memory shortage\n" , dev->name); last_jif = jiffies; }
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors