summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2022-02-28 04:15:55 +0100
committerDavid S. Miller <davem@davemloft.net>2022-02-28 14:21:32 +0100
commit98fffd72f934c48e7e69e21e1394de0b5aed49b4 (patch)
treed8b166dab85d72ceca61c6184eddc26bfadc2a25 /net/decnet
parentnet: wan: lmc: use time_is_before_jiffies() instead of open coding it (diff)
downloadlinux-98fffd72f934c48e7e69e21e1394de0b5aed49b4.tar.xz
linux-98fffd72f934c48e7e69e21e1394de0b5aed49b4.zip
net: decnet: use time_is_before_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 'net/decnet')
-rw-r--r--net/decnet/dn_nsp_out.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index eadc89583168..b05639bdfc8f 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -52,6 +52,7 @@
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/if_packet.h>
+#include <linux/jiffies.h>
#include <net/neighbour.h>
#include <net/dst.h>
#include <net/flow.h>
@@ -351,7 +352,7 @@ void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb,
* Slow start: If we have been idle for more than
* one RTT, then reset window to min size.
*/
- if ((jiffies - scp->stamp) > t)
+ if (time_is_before_jiffies(scp->stamp + t))
scp->snd_window = NSP_MIN_WINDOW;
if (oth)