* [patch 1/1] drivers/net/hamradio/mkiss.c : Use of time_before macro
@ 2005-07-14 22:22 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-14 22:22 UTC (permalink / raw)
To: ralf; +Cc: linux-hams, Marcelo Feitoza Parisi, domen
[-- Attachment #1: time_after-drivers_net_hamradio_mkiss --]
[-- Type: text/plain, Size: 1042 bytes --]
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
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 <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
mkiss.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: quilt/drivers/net/hamradio/mkiss.c
===================================================================
--- quilt.orig/drivers/net/hamradio/mkiss.c
+++ quilt/drivers/net/hamradio/mkiss.c
@@ -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;
}
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-14 22:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-14 22:22 [patch 1/1] drivers/net/hamradio/mkiss.c : Use of time_before macro domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox