Skip to contentSkip to conversation

drivers/net/hamradio/baycom_epp.c : Use of the

RFC PATCH New Marcelo Feitoza Parisi 1 participant 1 message Jul 16, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 drivers/net/hamradio/baycom_epp.c : Use of the

Use of the time_before() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.

drivers/net/hamradio/baycom_epp.c +1 -1
@@ -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) {

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors