slip.c jiffies cleanup
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 slip.c jiffies cleanup
Quoted 2 lines · Jeff Garzik
would you wind CC'ing
drivers/net/*stuff to me?
Sorry for not keeping you informed. Please also drop a note if I shall not yet Cc: Linus and Alan. While I have read lkml archives for many years now, I am not yet used to Cc:ing policy as this information is not kept the archives.
I could not find a maintainer for slip.c, which is the last of my network patches for now.
Tim
net/slip.c renamed from linux-2.4.14-pre6/drivers/net/slip.c +3 -3
@@ -483,7 +483,7 @@* 14 Oct 1994 Dmitry Gorodchanin. */ #ifdef SL_CHECK_TRANSMIT -if (jiffies - dev->trans_start <20 *HZ ) { +if (time_before (jiffies, dev->trans_start +20 *HZ )) {/* 20 sec timeout not reached */ goto out; }
@@ -1387,7 +1387,7 @@int i;if (slip_ctrls !=NULL ) { -unsigned long start = jiffies; +unsigned long timeout = jiffies +HZ ;int busy =0 ;/* First of all: check for active disciplines and hangup them.
@@ -1412,7 +1412,7 @@spin_unlock (&slc->ctrl.lock); }local_bh_enable (); - }while (busy && jiffies - start <1 *HZ ); + } while (busy && time_before(jiffies, timeout); busy =0 ;for (i =0 ; i < slip_maxdev; i++) {
Quoted 2 lines · Tim Schmielau
net/slip.c renamed from linux-2.4.14-pre6/drivers/net/slip.c +0
-0
[...]
net/slip.c line 1418
Quoted 10 lines
net/slip.c renamed from linux-2.4.14-pre6/drivers/net/slip.c +1
-1@@ -1412,7 +1412,7 @@spin_unlock (&slc->ctrl.lock); }local_bh_enable (); - }while (busy && jiffies - start <1 *HZ ); + } while (busy && time_before(jiffies, timeout); busy =0 ;for (i =0 ; i < slip_maxdev; i++) {
Sorry all, I screwed up.
While I did compile before sending the patch,
somehow I must have missed the error message.
Patch must be
net/slip.c
Quoted 2 lines
net/slip.c renamed from linux-2.4.14-pre6/drivers/net/slip.c +1
-1- }while (busy && jiffies - start <1 *HZ ); + }while (busy &&time_before (jiffies, timeout));
New patch appended.
Tim
net/slip.c renamed from linux-2.4.14-pre6/drivers/net/slip.c +3 -3
@@ -483,7 +483,7 @@* 14 Oct 1994 Dmitry Gorodchanin. */ #ifdef SL_CHECK_TRANSMIT -if (jiffies - dev->trans_start <20 *HZ ) { +if (time_before (jiffies, dev->trans_start +20 *HZ )) {/* 20 sec timeout not reached */ goto out; }
@@ -1387,7 +1387,7 @@int i;if (slip_ctrls !=NULL ) { -unsigned long start = jiffies; +unsigned long timeout = jiffies +HZ ;int busy =0 ;/* First of all: check for active disciplines and hangup them.
@@ -1412,7 +1412,7 @@spin_unlock (&slc->ctrl.lock); }local_bh_enable (); - }while (busy && jiffies - start <1 *HZ ); + }while (busy &&time_before (jiffies, timeout)); busy =0 ;for (i =0 ; i < slip_maxdev; i++) {