drivers/net/hamradio/mkiss.c : Use of time_before macro
PATCH 1/1 drivers/net/hamradio/mkiss.c : Use of time_before macro
From: Marcelo Feitoza Parisi <[email protected]>
Use of 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]>
Signed-off-by Domen Puncer <[email protected]>
--- mkiss.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/hamradio/mkiss.c +2 -1
@@ -46,6 +46,7 @@#include <linux/etherdevice.h> #include <linux/skbuff.h> #include <linux/if_arp.h> +#include <linux/jiffies.h> #include <net/ax25.h>
@@ -429,7 +430,7 @@ static int ax_xmit(struct sk_buff *skb,* May be we must check transmitter timeout here ? * 14 Oct 1994 Dmitry Gorodchanin. */ -if (jiffies - dev->trans_start <20 *HZ ) { +if (time_before (jiffies, dev->trans_start +20 *HZ )) {/* 20 sec timeout not reached */ return 1 ; }
--