Commit 882edc06 authored by Wang Qing's avatar Wang Qing Committed by David S. Miller

net: ethernet: use time_is_before_eq_jiffies() instead of open coding it

Use the helper function time_is_{before,after}_jiffies() to improve
code readability.
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5081bad
......@@ -28,6 +28,7 @@
#include <linux/udp.h>
#include <linux/if_vlan.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <net/ip6_checksum.h>
#include "jme.h"
......@@ -2179,7 +2180,7 @@ jme_stop_queue_if_full(struct jme_adapter *jme)
}
if (unlikely(txbi->start_xmit &&
(jiffies - txbi->start_xmit) >= TX_TIMEOUT &&
time_is_before_eq_jiffies(txbi->start_xmit + TX_TIMEOUT) &&
txbi->skb)) {
netif_stop_queue(jme->dev);
netif_info(jme, tx_queued, jme->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment