diff options
author | Wang Qing <wangqing@vivo.com> | 2022-02-28 04:12:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-28 14:21:31 +0100 |
commit | 882edc06216834bf0963c4bfaf926f53eea04495 (patch) | |
tree | 306a876b43c3de2f829184599798a7aeadf35088 /drivers | |
parent | net: phylink: remove phylink_set_pcs() (diff) | |
download | linux-882edc06216834bf0963c4bfaf926f53eea04495.tar.xz linux-882edc06216834bf0963c4bfaf926f53eea04495.zip |
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: Wang Qing <wangqing@vivo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/jme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 439674fc9765..b6c5122da995 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c @@ -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, |