Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wang Qing and committed by
David S. Miller
98fffd72 b7eb7f67

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