drivers/net/shaper.c : Use of the time_before() and
Subsystems (2)
PATCH 1/1 drivers/net/shaper.c : Use of the time_before() and
Use of the time_before() and time_after() macros, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.
Signed-off-by Marcelo Feitoza Parisi <[email protected]>
drivers/net/shaper.c +4 -2
@@ -161,7 +161,8 @@while (ptr && ptr!=(struct sk_buff *)&shaper->sendq) {if (ptr->pri<skb->pri - && jiffies -SHAPERCB (ptr)->shapeclock <SHAPER_MAXSLIP ) + &&time_before (jiffies,SHAPERCB (ptr)->shapeclock + +SHAPER_MAXSLIP )) {struct sk_buff *tmp=ptr->prev;
@@ -214,7 +215,8 @@/* * Queue over time. Spill packet. */ -if (SHAPERCB (skb)->shapeclock-jiffies >SHAPER_LATENCY ) { +if (time_after (SHAPERCB (skb)->shapeclock, jiffies + +SHAPER_LATENCY )) {dev_kfree_skb (skb); shaper->stats.tx_dropped++; }else
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors