mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: ethernet: sun: 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>
This commit is contained in:
parent
3b6cab7b5a
commit
e0e8028cc0
1 changed files with 3 additions and 2 deletions
|
@ -88,6 +88,7 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#define cas_page_map(x) kmap_atomic((x))
|
||||
#define cas_page_unmap(x) kunmap_atomic((x))
|
||||
|
@ -4063,8 +4064,8 @@ static void cas_link_timer(struct timer_list *t)
|
|||
|
||||
if (link_transition_timeout != 0 &&
|
||||
cp->link_transition_jiffies_valid &&
|
||||
((jiffies - cp->link_transition_jiffies) >
|
||||
(link_transition_timeout))) {
|
||||
time_is_before_jiffies(cp->link_transition_jiffies +
|
||||
link_transition_timeout)) {
|
||||
/* One-second counter so link-down workaround doesn't
|
||||
* cause resets to occur so fast as to fool the switch
|
||||
* into thinking the link is down.
|
||||
|
|
Loading…
Add table
Reference in a new issue