diff options
author | Wang Qing <wangqing@vivo.com> | 2022-02-27 19:13:00 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-28 13:21:31 +0000 |
commit | 3b6cab7b5a2feed11f3d6ad90e0ad8ea03f87670 (patch) | |
tree | 8a5476d9624596f5f7867299509d66f037ac00df | |
parent | 882edc06216834bf0963c4bfaf926f53eea04495 (diff) | |
download | linux-3b6cab7b5a2feed11f3d6ad90e0ad8ea03f87670.tar.gz linux-3b6cab7b5a2feed11f3d6ad90e0ad8ea03f87670.tar.bz2 linux-3b6cab7b5a2feed11f3d6ad90e0ad8ea03f87670.zip |
net: qlcnic: 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>
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c index 29cdcb2285b1..bcf3746220df 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c @@ -10,6 +10,7 @@ #include <linux/ipv6.h> #include <net/checksum.h> #include <linux/printk.h> +#include <linux/jiffies.h> #include "qlcnic.h" @@ -332,7 +333,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter, hlist_for_each_entry_safe(tmp_fil, n, head, fnode) { if (ether_addr_equal(tmp_fil->faddr, (u8 *)&src_addr) && tmp_fil->vlan_id == vlan_id) { - if (jiffies > (QLCNIC_READD_AGE * HZ + tmp_fil->ftime)) + if (time_is_before_jiffies(QLCNIC_READD_AGE * HZ + tmp_fil->ftime)) qlcnic_change_filter(adapter, &src_addr, vlan_id, tx_ring); tmp_fil->ftime = jiffies; |