* [KJ] [RFC PATCH] drivers/net/hamradio/baycom_epp.c : Use of the
@ 2005-07-16 7:28 Marcelo Feitoza Parisi
0 siblings, 0 replies; only message in thread
From: Marcelo Feitoza Parisi @ 2005-07-16 7:28 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: baycom_epp.patch --]
[-- Type: text/x-patch, Size: 643 bytes --]
Use of the 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>
--- linux/drivers/net/hamradio/baycom_epp.c 2005-07-13 17:53:28.000000000 -0300
+++ linux-kj/drivers/net/hamradio/baycom_epp.c 2005-07-16 03:46:40.491146568 -0300
@@ -911,7 +911,7 @@
/* autoprobe baud rate */
tstart = jiffies;
i = 0;
- while ((signed)(jiffies-tstart-HZ/3) < 0) {
+ while (time_before(jiffies, tstart + HZ/3)) {
if (pp->ops->epp_read_addr(pp, &stat, 1, 0) != 1)
goto epptimeout;
if ((stat & (EPP_NRAEF|EPP_NRHF)) == EPP_NRHF) {
[-- Attachment #3: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-16 7:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-16 7:28 [KJ] [RFC PATCH] drivers/net/hamradio/baycom_epp.c : Use of the Marcelo Feitoza Parisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).