mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
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>
This commit is contained in:
parent
a5081bad2e
commit
882edc0621
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue