History

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.

Wang Qing committed 4 years ago

Commit 98fffd71 parent b7eb7f61 file · +2 −1Browse files

Unified · Split

net/decnet/dn_nsp_out.c+2−1
@@ -52,6 +52,7 @@ · 51 unmodified lines
52#include <linux/init.h>52#include <linux/init.h>
53#include <linux/poll.h>53#include <linux/poll.h>
54#include <linux/if_packet.h>54#include <linux/if_packet.h>
55#include <linux/jiffies.h>
55#include <net/neighbour.h>56#include <net/neighbour.h>
56#include <net/dst.h>57#include <net/dst.h>
57#include <net/flow.h>58#include <net/flow.h>
@@ -351,7 +352,7 @@ void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, · 293 unmodified lines
351 * Slow start: If we have been idle for more than352 * Slow start: If we have been idle for more than
352 * one RTT, then reset window to min size.353 * one RTT, then reset window to min size.
353 */354 */
354 if ((jiffies - scp->stamp) > t)355 if (time_is_before_jiffies(scp->stamp + t))
355 scp->snd_window = NSP_MIN_WINDOW;356 scp->snd_window = NSP_MIN_WINDOW;
356 357
357 if (oth)358 if (oth)